Skip to content

Instantly share code, notes, and snippets.

@RobRuana
Last active September 30, 2019 14:11
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 RobRuana/0eb0a71e8b53eeb453b1 to your computer and use it in GitHub Desktop.
Save RobRuana/0eb0a71e8b53eeb453b1 to your computer and use it in GitHub Desktop.
Useful bash aliases
#--------------------------------------------------------
# Personal bash aliases
#--------------------------------------------------------
# Prevent accidentally clobbering files
#alias rm='rm -i'
#alias cp='cp -i'
#alias mv='mv -i'
alias mkdir='mkdir -p'
# Shortcuts
alias ql='qlmanage -p &>/dev/null'
alias vi='vim'
alias h='history'
alias ..='cd ..'
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
# Pretty-print of some PATH variables:
alias path='echo -e ${PATH//:/\\n}'
alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}'
# A better which
alias which='type -a'
# Make pgrep search full argument list and use long output
alias pgrep='pgrep -lf'
# The 'ls' family (-G adds color)
alias ll='ls -l -G' # long form
alias la='ls -al -G' # show hidden files
alias ls='ls -F -G' # adds filetype recognition
# Less is so much more than more
alias more='less'
# Open Finder at current directory
alias Finder='open /System/Library/CoreServices/Finder.app "${PWD}"'
alias finder='Finder'
# Spelling typos - highly personal :)
alias cd..='cd ..'
alias cd,,='cd ..'
alias xs='cd'
alias vf='cd'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment