Designer vs. TerminalJune 15, 2014 -
It was 2010. It was the first time I would square off against the dreaded terminal. I was a web designer at an agency, and I had just read an article in .net Magazine about Sass. “I’d like to give that a shot!” The “getting started” bit began with Terminal. Predictably it didn’t go well, or make any sense to me. My anti-terminal stance began, and held me back professionally for a couple years.
Fast forward a few years and we’re in an era where Terminal is not an option. Thankfully there are some things you can do to make this tool more designer friendly.
By default terminal will spit out white monospaced text on black. This can be hard to scan – but thankfully there are ways to customize this! There are some system files you can configure.
The first is .bashrc – by default on a Mac this is in the user root folder. In here you can add whitespace around the commands, and add some colouring.
Before we get started we need .bash_profile. This is sought out by terminal on load. In it I have
[[ -s ~/.bashrc ]] && source ~/.bashrc
There are a bunch of new commands to memorize; many that you’ll have to enter on a regular basis. In your .bashrc folder you can create shortcuts (“aliases”) that make this easier. For example, if I want to go to my desktop in terminal, I can just type “desktop” and this happens. Thanks to this alias:
alias desktop='cd /Users/arleym/desktop'
Customizing terminal is an investment of time, but thankfully you can take it all with you! I save my .bashrc in my Dropbox folder! By adding a system symlink this works perfectly.
ln -s ~/Dropbox/dotfiles/.bashrc ~/.bashrc
In my .bashrc I keep all of the shortcuts that work on my work iMac, and my personal MacBook. My .bashrc also references a ~/.bash_profile folder that has the aliases that only make sense for that respective machine.
Put it all together and the terminal is a lot friendlier for me! Here’s a screenshot:
You can see my .bashrc file on Github; https://gist.github.com/arleym/852aab7ec6ef04ea2ac5
Got any other tricks or useful tidbits? I’d love to hear them!
Categorized in: Tech
This post was written by ArleyM