Speeding Up Your Shell
by James
I really should download a copy of PeepCode’s advanced command line tutorial, but I’m a bit of a cheapskate so I just scanned the screenshots instead! They reminded me of how it’s possible to set aliases for your UNIX shell.
[bash]
alias ls="ls -la"
[/bash]
Saves a few keystrokes. Of course you might think that a few keystrokes is nothing, but believe me, when you’re using the same commands again and again, the few keystrokes really add up. And it’s not just about taking the strain off your fingers: the sense of ease which comes from shorter commands help to stop you getting bored, too!
Here’s a list of the aliases I use for working with Rake and Git:
[bash]
# Rake
alias r="rake"
alias rt="rake -T"
# Git
alias ga="git add $*"
alias gaa="git add –all"
alias gb="git branch $*"
alias gbr="git branch -r $*"
alias gc="git commit $*"
alias gca="git commit -a $*"
alias gco="git checkout $*"
alias gd="git diff"
alias gp="git push"
alias gpa="git push –all"
alias gpl="git pull"
alias gs="git status"
[/bash]
I’m not so hot on Bash, so please correct me where I’ve made errors! I hope someone finds these useful — they’ve certainly helped me.