Created
October 6, 2012 18:25
-
-
Save jacksoncage/3845713 to your computer and use it in GitHub Desktop.
bashrc, tips and tricks to make every day life easier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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