bash helper stuff

I get fixated a little on how to be more “efficient.” Part of that includes setting up my environment so it works well. When I’m using bash (a UNIX shell), here are a couple of things that’ve helped save time:

  • bash-completion: Totally Awesome. Use this or else. (Note that ssh ser will complete the server name, for example.)</span>
  • Bash Emacs Editing Mode cheat sheet. (Note I grew up in vi but have been dedicating a LOT of time to learning Emacs, so I use set -o emacs.)
  • bashmarks: gives you simple aliases you can use to move directories, e.g. “g alias” goes to the directory associated with “alias”.
  • git-flow-bash-completion
  • venv_cd: If you use virtualenvs, this will auto-“workon” them for you. Make sure you source this *before* bashmarks. I don’t know why, but my experience is that this needs to get sourced first so that “g alias” will also check for virtualenvs.
  • Learn your basic bash shortcuts, e.g. the power of squiggles “mv x{,-old}”, variable manipulation (e.g. “${x%.html}” removes “.html” from the end) and re-use of previous arguments e.g. “ls -l !$”

Updated: