Top Ten Terminal Tips

  1. One Letter aliases x=’exit’; alias l=’ls -alFtrG’; alias p=’pwd’; g=’git status’
  2. user – pwd – git branch in the bash prompt, e.g. durrantm@Castle2012:~/Dropnot/webs/rails_apps/linker (master) with
    parse_git_branch () {
    git branch 2> /dev/null | sed -e ‘/^[^*]/d’ -e ‘s/* \(.*\)/ (\1)/’
    PS1=’\[33[01;32m\]\u@\h\[33[00m\]:\[33[01;34m\]\w\[33[01;33m\]$(parse_git_branch)\[33[00m\]\n\$ ‘
    (Add above to your .bashrc file)
  3. automatic CDing shopt -s autocd
  4. git branch completion script (
  5. use tmux
  6. alias hg = ‘history | grep ‘l
  7. .vimrc file for better editing preferences
  8.  mousing in tmux panes with a .tmux.conf file with  set -g mouse-select-pane on &  set -g mouse-resize-pane on
  9. Use locate over find when possible
  10. alias for current code, e.g. alias q=’cd ~/Dropbox/95_2014/work/code/ruby__rails/ruby/ruby_quiz’