16 Aug 2007, 12:14pm
/dev/rails /dev/random
by chris

3 comments

Handy bash Aliases

Today I finally got around to editing my .bash_profile to include the following aliases. I find they make general command line use more pleasant.

The first one remaps ls to show a useful amount of information. Never in my lifetime of using computers have I ever wanted ls to output the way it does by default.

The next two just save a couple of characters by removing the cd from their respective command and optimizing the dual backstep (a cool shell script would be one that counts the number of consecutive periods and cd's back that many directories – 1).

The last one is Rails-specific and simply fires up the default server from your Rails project directory.

alias ls=’ls -alh’
alias ..=’cd ..’
alias …=’cd ../..’
alias home=’cd ~’

alias ss=’script/server’

Update: See Sam’s suggestions for fast ls variants below.