Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created September 7, 2010 22:11
Show Gist options
  • Select an option

  • Save bernerdschaefer/569232 to your computer and use it in GitHub Desktop.

Select an option

Save bernerdschaefer/569232 to your computer and use it in GitHub Desktop.
# Store 10,000 history entries
export HISTSIZE=10000
# Don't store duplicates
export HISTCONTROL=erasedups
# Append to history file
shopt -s histappend
# Conveniently download external resources:
# fetch http://example.com/library.tar.gz
# fetch ftp://example.com/file.zip
function fetch() {
case "$1" in
*.tar.gz) curl -L $1 | tar -zxv ;;
*.tar.bz2) curl -L $1 | tar -jxv ;;
*.zip) curl -L $1 > tmp.zip && unzip tmp.zip && rm tmp.zip ;;
esac
}
"\ep": history-search-backward
"\en": history-search-forward
"\C-x\C-r": re-read-init-file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment