Monday, November 23, 2009

Bash - Shortcut + Stuffs

Bash Movements
Ctrl+A Move cursor to beginning of line.
Ctrl+B Move cursor to left.
Ctrl+C Abort current command.
Ctrl+D Delete character at current cursor position.
Ctrl+E Move cursor to end of line.
Ctrl+F Move cursor to the right.
Ctrl+H Delete character to the left of current cursor position.
Ctrl+K Erase from current cursor position to end of line.
Ctrl+L Clear screen and display current line.
Ctrl+N Bring up next command line.
Ctrl+P Bring up previous command line.
Ctrl+Q Continue displaying to screen.
Ctrl+S Stop displaying to screen.
Ctrl+U Erase from current cursor position to beginning of line.
Ctrl+W Delete word at current cursor position to the left.
Ctrl+Y Yank back the last item erased by ....
Ctrl+Z Suspend the current command.
Alt+B Move cursor one word to the left.
Alt+C Capitalize first letter of the following word.
Alt+D Delete word at current cursor position (to the right).
Alt+F Move cursor one word to the right.
Alt+L De-capitalize following word.
Alt+R Revert to last command line.
Alt+U Capitalize following word.
Alt+BS Delete word at current cursor position (to the left).
Alt+. Last argument of last previous command.

Bash Variables
$0 - Shell Name
$$ - Shell Process ID
!$ - Holds the last command Argument - similar to $_ ( But you can see change in behavior)
!:1 - last command first argument

No comments: