This works if whatever is currently running in your terminal has support for the XTerm mouse escape sequences. Option-click is the shortcut to tell the terminal to forward the click to the application running in the terminal. That's usually your shell or some editor. I seem to faintly remember that at some point this was actually configurable and you could configure the terminal to forward non-option-clicks and only…
Quick tip for developers who use OS X
241–250 of 406 posts
Re: Quick tip for developers who use OS X
#242Two more (for Bash) - Ctrl-x, Ctrl-e will pop open your EDITOR so you can edit the command. Saving and closing the editor brings the command back in your terminal and automatically executes it. fc will bring up your EDITOR with the last typed command. (You can use fc -l to see a list of commands)
Re: Quick tip for developers who use OS X
#243Re: Quick tip for developers who use OS X
#244Bash, running in your terminal, understands both the Emacs and the Vi commands. By default is Emacs, so you can C-a (control-a) for beginning of line, C-p to go back in command line history, or C-r to search it. I prefer the Vi mode, though. Add to your .bashrc set -o vi Then you can press escape to go from input mode to normal mode; there k will take you to the previous line in command line history, j to the next li…
set completion-ignore-case On
set bell-style none
set editing-mode vi
$if mode=vi
set keymap vi-command
"gg": beginning-of-history
"G": end-of-history
set keymap vi-insert
"jj": vi-movement-mode
"\C-p": history-search-backwardRe: Quick tip for developers who use OS X
#245Earlier quoted context omitted.
After using OS X for a few months, I weep every time I use the commandline on Windows. There's just no reason for Windows to be that bad.
Did you try Powershell?
I second the "everything is about five syllables" and sure, you can set up aliases, but I went through that hell on VAX/VMS and don't want to go back.
Re: Quick tip for developers who use OS X
#246Earlier quoted context omitted.
After using OS X for a few months, I weep every time I use the commandline on Windows. There's just no reason for Windows to be that bad.
Did you try Powershell?
Plus why are all the built-in commands like 20 characters long and camel cased?
Re: Quick tip for developers who use OS X
#247Earlier quoted context omitted.
Also very useful for similar use cases is qlmanage. $ qlmanage -p
This seems to run whatever code usually runs when you hit [space] on a filename in a Finder window. (Except that it outputs a bunch of debugging information.) Under what circumstances is that any better or more useful than "open"?
Re: Quick tip for developers who use OS X
#248Nobody seems to have posted this yet: python -m SimpleHTTPServer I'd recommend an alias like "serve". It basically puts the current directory online (binds to 0.0.0.0:8000).
Re: Quick tip for developers who use OS X
#249Earlier quoted context omitted.
Sorry, but this is laughable. Keyboard shortcuts are far more useful and consistent across applications in OS X. I'm failing to understand how you could form this opinion...which shortcuts / programs don't meet your expectations? I guess I can sum this up by saying OS X has an additional modifier key than Windows, so you basically have 33% more power right out of the gate. The "Windows Key" is nearly useless.
I couldn't agree with you more! I used to be (a long time ago) a avid Windows user, and scoffed at Mac's. I then got into the publishing world where everything is Mac. The keyboard shortcuts are by far much more consistent and easier on OS X. I am scratching my head wondering how anyone could ever come up with a different conclusion, the difference is night and day.
The WindowsKey is often overlooked, for example, there are great key combinations for manipulating application windows. WindowsKey+Arrow moves the current window around in a logical way (up maximizes, left docks to left edge of screen, etc), WindowsKey+Shift+Arrow moves the current window to another monitor in a sensible fashion. Out of the box OS X doesn't seem to have equivalents.
Re: Quick tip for developers who use OS X
#250Earlier quoted context omitted.
Pressing ESC and then _ will insert the last argument of the last line. Repeat to go up in the history. If you go through the command history and press CTRL-o on a line it will be executed and the command on the commandline will be replaced by the next line in the history.
In Bash, you also can use the $_ variable which is the last argument of the previous command: $ stat /tmp/foobar File: `/tmp/foobar' Size: 0 Blocks: 0 IO Block: 4096 ... $ rm -v $_ removed `/tmp/foobar'