Skip to content

Instantly share code, notes, and snippets.

@ninehills
Last active December 19, 2015 08:29
Show Gist options
  • Save ninehills/5925623 to your computer and use it in GitHub Desktop.
Save ninehills/5925623 to your computer and use it in GitHub Desktop.
bash history set
# unlimit history
export HISTFILESIZE=
export HISTSIZE=
# color history out
export HISTTIMEFORMAT="[$(tput setaf 6)%F %T$(tput sgr0)]: "
# append to the history file, don't overwrite it
shopt -s histappend
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
export HISTCONTROL=ignoreboth
# Keeping bash history in sync on disk and between multiple terminals
export PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment