Devigner blog about development and design

Portable .bash_profile via TextExpander

I’m taking a short hiatus from the Emacs Series for a stupid hack that actually works quite well for me.

Alias are great for quickly getting things done in terminal but the bad side is I quickly forget the true commands, especially long ones. I spend a lot of time using ssh for my sites and client sites some of which I have no control over the server configuration and .bash_profile or .bashrc for my aliases.

Today I decided to give TextExpander a try as an alias-hack. I created some snippets from a few of my commonly used commands for clearing .pyc files from Django projects to SVN and GIT commands. Enter the shortcuts into terminal when I’m connected to another server and I have mimicked my alias effectively.

I’ve copied some useful aliases from my .bashrc for use in secure shell. It’s probably a good idea to prefix the shortcut with another letter or your TextExpander shortcuts will over-ride your bash aliases when on your local machine. If there’s a way to take advantage of your bash aliases on a server you have NO control over, I’m open to suggestions and willing to learn a new trick.