Skip to content

Instantly share code, notes, and snippets.

@karbassi
Created November 11, 2009 21:31
Show Gist options
  • Save karbassi/232319 to your computer and use it in GitHub Desktop.
Save karbassi/232319 to your computer and use it in GitHub Desktop.
#Just pure awesomeness!
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward
bind Space:magic-space
# Misc -------------------------------------------------------------
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups:erasedups
# ... or force ignoredups and ignorespace
# export HISTCONTROL=ignoreboth:erasedups
# Don't put 'history' commands themselves in the history
export HISTIGNORE='history*'
# Keep no more than 1,000,000 lines
export HISTFILESIZE=1000000
export HISTSIZE=1000000
# Append, don't overwrite history
shopt -s histappend
# Check window size after each command to avoid annoying effects of resizing
shopt -s checkwinsize
# Ignore typoes
shopt -s cdspell
# This will ensure that multiple line commands stay together in your history.
shopt -s cmdhist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment