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
FILES /bin/bash The bash executable /etc/profile The systemwide initialization file, executed for login shells ~/.bash_profile The personal initialization file, executed for login shells ~/.bashrc The individual per-interactive-shell startup file ~/.bash_logout The individual login shell cleanup file, executed when a login shell exits ~/.inputrc Individual readline initialization file
This is one of my favorites:
if [[ $- == *i* ]] then bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward' fi
It matches what you’ve typed in the shell with historical lines.
$ sudo nmap <Up arrow ↑> results in $ sudo nmap -p22 -Pn 192.168.1.1-254 | grep -B5 Raspberry
Keep the local stuff in ~/.aliases for a machine
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.)