Skip to content

Instantly share code, notes, and snippets.

@RichardPovinelli
Forked from RichardPovinelli/.bash_aliases
Created November 19, 2012 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardPovinelli/4111449 to your computer and use it in GitHub Desktop.
Save RichardPovinelli/4111449 to your computer and use it in GitHub Desktop.
.bash_aliases for OS X
#!/bin/sh
# .bash_aliases
alias la='ls -alh'
alias lal='ls -alh | less'
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