Skip to content

Instantly share code, notes, and snippets.

@johntyree
Created June 24, 2015 20:03
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save johntyree/17dabece34f8e6c7ab52 to your computer and use it in GitHub Desktop.
Save johntyree/17dabece34f8e6c7ab52 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Don't put duplicate lines in the history
export HISTCONTROL=ignoredups
# Store a lot history entries in a file for grep-age
shopt -s histappend
export HISTFILE=~/long_history
export HISTFILESIZE=50000
# No reason not to save a bunch in history
# Takes up several more MBs of RAM now, oOOOooh
export HISTSIZE=9999
# Ignore dupe commands and other ones you don't care about
export HISTIGNORE="&:[ ]*:exit"
# Up and down arrow to search
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