Skip to content

Instantly share code, notes, and snippets.

@jacine
Created November 1, 2011 17:54
Show Gist options
  • Save jacine/1331341 to your computer and use it in GitHub Desktop.
Save jacine/1331341 to your computer and use it in GitHub Desktop.
Command history
# Set history options
export HISTFILESIZE=10000000
export HISTSIZE=1000
export HISTCONTROL=ignoredups
# Write to history file whenever the prompt is displayed
PROMPT_COMMAND='history -a'
# Bind history-search-backward and forward to up and down arrow keys
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment