I tried out zsh, but it had too many buggy display bits for my tastes. likely the stuff I was using in conjunction.

So I’ve stuck with bash and build a fairly solid config that works for the way I work.

A great book for learning bash is the O’Reily Learning the bash shell

           The bash executable
           The systemwide initialization file, executed for login shells
           The personal initialization file, executed for login shells
           The individual per-interactive-shell startup file
           The individual login shell cleanup file, executed when a login shell exits
           Individual readline initialization file


Historical Matching

This is one of my favorites:

if [[ $- == *i* ]]
  bind '"\e[A": history-search-backward'
  bind '"\e[B": history-search-forward'

It matches what you’ve typed in the shell with historical lines.


$ sudo nmap <Up arrow &uarr;> 
results in 
$ sudo nmap -p22 -Pn | grep -B5 Raspberry



Keep the local stuff in ~/.aliases for a machine

See also

I’ve been playing around with a script that replaces all of the . files with files stored in a git repo.

Super handy for deploying new personal systems.

dotfiles forked from michaeljsmalley (His repos do not seem to exist any longer.)