Bash (command line) shortcuts

0 views
Skip to first unread message

Jean-Christophe Helary

unread,
Mar 29, 2009, 11:08:44 AM3/29/09
to Mac for Translators
Until today, I only used the following shortcuts on the command line:

ctrl+a -> go to beginning of line
ctrl+e -> go to end of line
ctrl+k -> delete to end of line

And even though I was very frustrated by the fact that I had to use
the mouse to select/copy/paste etc, it never really occured to me to
google for "bash command line shortcuts"...

To make it short: bash uses the readline library.

The user documentation for readline is at:
http://tiswww.case.edu/php/chet/readline/rluserman.html

All the shortcuts that exist on your machine can be found by using the
command 'bind':

$ bind -P | more

You'll have more shortcuts with:

$ bind -p | more

If you want to know how to use 'bind' to add shortcuts, check its help
file:

$ help bind


I still have to find how to select a string and put it into the
pasteboard for pasting outside of Terminal though (like select a
command and paste it into a mail for ex).

Also, the ctrl-y (Yank/paste) command works only within the
application from where the string was "killed". It is not going to
other applications (even though they may accept ctrl-y as a Yank
command).

Jean-Christophe Helary

------------------------------------
http://mac4translators.blogspot.com/

Reply all
Reply to author
Forward
0 new messages