Created
November 5, 2012 17:26
-
-
Save RichardPovinelli/4018559 to your computer and use it in GitHub Desktop.
.bash_aliases
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
#!/bin/sh | |
# .bash_aliases | |
# enable color support of ls and also add handy aliases | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi | |
alias la='ls -alh' | |
alias lal='ls --color -alh | less -r' | |
alias h='history' | |
#strips off current comment from history so it doesn't show up | |
alias hg='history | head -$((`history | wc -l` - 1)) | grep -i ' | |
#don't add same commands, h, and, exit to history list | |
export HISTIGNORE="&:h:exit" | |
export HISTCONTROL=ignoreboth | |
export HISTSIZE=2000 | |
shopt -s cmdhist | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment