Terminal Tips and Tricks For Mac OS X
superuser.com
superuser.com
I use this constantly in deploy, etc, scripts so I can run my compile + rsync + deploy command in a terminal, background it, and go work on something else until the process finishes. I'd say it's generally useful for anything that takes longer than 10 seconds but less than an hour (after an hour you tend to forget what's going on; might as well just email yourself.)
Festival (http://www.cstr.ed.ac.uk/projects/festival/) is something similar for *NIX users.
Pre-Edit: /usr/bin/canberra-gtk-play , according to my Ubuntu's startup applications preferences.
Common uses include starting up Terminal with a command instead of just carte blanche, using a globbed rm to clean a folder I'm viewing in Finder, using ls/grep to find files in a current Finder window, &c. &c.
A lot of key emacs bindings--C-a, C-e, C-n, C-p, C-f, C-b--work in any text field (even, say, the Hacker News comment box). But M-f and M-b (which are really useful since they get you forward/backwards a word instead of just a letter or a whole line) don't work. When I try to type option and then a letter, I get weird symbols:
Here's option-b: ∫
Here's option-f: ƒ
To get make M-f and M-b work, go to Preferences->Settings->Keyboard and check the "Use option as meta key" box.
See http://skitch.com/jackowayed/dme91/terminal-fix-keybindings if you can't find it.
←/→ move left or right one character.
⌥ + ←/→ move left or right one word.
⌘ + ←/→ move to start or end of line
The list is a bit old, but maybe it helps with some odd keys. Now that unicode is pretty common, I try to stick to the ellipsis for example… I have to say that the compose position for dieresis is a bit more logical (compose-" as opposed to macs alt-u), which is quite useful if I don't want to switch keyboard layouts when typing a bit of German (or write a lot about Motörhead and Queensrÿche).
X11 also has "level 3" support, which is straight-forward additional characters when pressing a certain key, as opposed to combining multiple key presses. Mac's alt key basically does both to a certain degree. The fact that it's turned on by default and the keyboard viewer makes it a lot more common usage in my experience.
1. Change your layout from "USA" to "USA International (AltGr dead keys)". Then use right-alt+key to make various special characters (you can look at what each character does at "Show Current Layout").
2. Enable the "compose key" -- I use the Menu key for this -- which is described at http://sivers.org/compose-key (it's simple to enable: Keyboard Preferences→Layouts→Options→Compose Key Position). Both of these are customizable, so you can add your own combinations if you want.
There are some other ways:
3. Ctrl-Shift-U in a GTK+ text input to enter a code point, as you said.
4. Alternative input methods that let you type special characters in in various other ways, such as LaTeX names, if you prefer that.
Yes, please! This would be extraordinary! How do I do it?
To swap the command and option keys, but just in the terminal, you can use: http://github.com/aim-stuff/cmd-key-happy
There's a plugin for Terminal that implements copy-on-select, which I like, but Visor has it bundled, so I'm not sure what it's called, offhand.
"mdfind -name AppName" is a good start for a poor man's uninstaller on OS X.
I wondered for a long time how to uninstall packages from OS X until I discovered pkgutil.
EDIT: This issue no longer exists. Kindly ignore my comment.
bindkey -m > eval "stuff ' '" writebuf "exec sh -c 'pbcopy < /tmp/screen-exchange'"
then when you've made a selection in screen Copy Mode, just terminate it with '>' to stick it onto the system paste buffer.This is sort of a default behavior in Linux OSs and it's really annoying when you have to `cd` to the working path every time you open a new tab.
http://fishshell.org/screenshots.html
It's more user friendly and interactive.
Most of the stuff you would use in bash just works in fish as well, except that fish gives you nice help information when tabcompleting, a better command history that you can use filters on, colour feedback (red = invalid command, green is a-okay) and lots more.
Sure, some people will always stick to what they know, but that does not say as much about user friendliness as it does about resistance to change.
Here's a pic of it showing branch@revision status for svn repositories: http://tweetphoto.com/29802557
It does the same for git repositories as well and some other nice stuff.
Recent versions of zsh (though not the version that ships with OS X) have a feature called vcs_info that will pull information from git, svn, cvs, hg, darcs, bzr (& more) for use in your prompt.
say "I love you"
She was impressed :)