Skip to content

Instantly share code, notes, and snippets.

@danner
Created January 10, 2022 02:47
Show Gist options
  • Save danner/0890b98216a48d4574ab490b02afbf7b to your computer and use it in GitHub Desktop.
Save danner/0890b98216a48d4574ab490b02afbf7b to your computer and use it in GitHub Desktop.
helpful terminal stuff for macs
"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on
set completion-ignore-case on
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
# Save and reload the history after each command finishes
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment