Saturday, 7 April 2007

alias and cvs

If you were to execute a `man alias` command, depending on your CLI shell, you might be shown a list of builtin commands.

`aliasing' is something that can be a great weapon in working with branches of a software project. For example, it is a pragmatic programmer that makes sure, when merging or just hoping between checked out code bases, he/she has the latest code. Either you make it practice to always `cvs update` when popping into a directory, or you automate it, as I have done with an alias.

A sanitized sample of my alias file that is sourced in my .zshrc file:

...
alias p='cd /prod;cvs up'
alias h='cd /head;cvs up'
...

The actions in this file are obvious, but to the uninitiated, at a prompt: $ p, does two things, first it moves me to the prod branch, then updates the branch to the latest state.

There are probably other ways to do this as well, but this was a simple hack in a file that I use every day to move around my filesystem.

Posted by caffeinated at 4:59 PM in nerdery

 

[Trackback URL for this entry]

Your comment:

(not displayed)
 
 
 

Live Comment Preview: