My "two keystroke solution" (one letter and the return key) is to have this alias set up:
alias a='. ~/.bash_aliases'
Then whenever I update my .bash_aliases file I just type a
return
One step further is maintain them across machines, using github:
bup () { [ $# = 1 ] && { cp -v ~/$1 ~/Dropnot/setups; cd ~/Dropnot/setups; git fetch; git merge origin/master; git add $1; git commit -m"$1 update"; git push origin master; cp -v $1 ~; cd -; } || echo "Error - no filename passed!";}
Usage: bup [file] # file must be in ~, is usually a dot file]
.
instead ofsource
and press [Alt]+[.] to insert the last argument of the previous command, so you can do the equivalent ofsource ~/.bash_aliases.sh
in just four keystrokes without the need for any custom functions.