Skip to content

Instantly share code, notes, and snippets.

@jacksoncage
Created October 6, 2012 18:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacksoncage/3845713 to your computer and use it in GitHub Desktop.
Save jacksoncage/3845713 to your computer and use it in GitHub Desktop.
bashrc, tips and tricks to make every day life easier
## multi-line prompt
PS1='
[\d \t \u@\h:\w ]
$> '
## aliases
alias cd..="cd .."
alias l="ls -al"
alias lp="ls -p"
alias ll="ls -lahG"
alias less="less -MNR"
alias h=history
## flush the local dns cache
alias flushdns="dscacheutil -flushcache"
# make history file bigger
HISTFILE=~/.bash_history
HISTSIZE=10000
HISTFILESIZE=999999
# don't let the users enter commands that are ignored in the history file
HISTIGNORE=""
HISTCONTROL=""
readonly HISTFILE
readonly HISTSIZE
readonly HISTFILESIZE
readonly HISTIGNORE
readonly HISTCONTROL
export HISTFILE HISTSIZE HISTFILESIZE HISTIGNORE HISTCONTROL
# ignore commands that lead with a space, ignore dups
export HISTCONTROL=ignoreboth,ignoredups
shopt -s histappend
## Up Arrow: search and complete from previous history
bind '"\eOA": history-search-backward'
## Down Arrow: search and complete from next history
bind '"\eOB": history-search-forward'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment