Skip to content

Instantly share code, notes, and snippets.

@noahfrederick
Created February 20, 2012 01:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahfrederick/1866901 to your computer and use it in GitHub Desktop.
Save noahfrederick/1866901 to your computer and use it in GitHub Desktop.
Bash Readline Tips - handy key bindings

GNU Readline Guide

See http://cnswww.cns.cwru.edu/php/chet/readline/readline.html

Movement

  • C-a Go to beginning of line
  • C-e Go to end of line
  • M-f Go forward one word
  • M-b Go back one word

Editing

  • C-d Delete character under cursor
  • C-_/C-x C-u Undo
  • C-x C-e Edit current command line in $EDITOR
  • Bash provides command fc to fix last command in editor and run on quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment