Skip to content

Instantly share code, notes, and snippets.

@felixhummel
Created October 16, 2011 08:53
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 felixhummel/1290678 to your computer and use it in GitHub Desktop.
Save felixhummel/1290678 to your computer and use it in GitHub Desktop.
$HOME/.bash/bindings.sh
# how to create new shortcuts:
# run ``cat > /tmp/x``
# type your shortcut
# press enter (creates new line still in cat)
# press C-d to send EOF to cat
# run ``cat -v /tmp/x | sed 's;\^\[;\\e;'``
# paste output here
# ipython style history
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
# fast cd .. :)
bind '"\e[1;5A": "pushd .. &> /dev/null\n"'
bind '"\e[1;5B": "popd &> /dev/null\n"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment