Bash Alias for Darcs users
I've been using darcs for quite a while. I really love its simplicity and distributed nature. I found myself repeating myself again and again typing basic darcs commands after using the techniques described in this excellent blog. Here are a few additions I added to my ~/.bash_profile to minimize the types I need to make. Explanations in lines.
# Setup editor environment editors to let darcs know.
EDITOR=gvim
VISUAL=gvim
export EDITOR VISUAL
# My typical patch naming convention is {year-month-date-hour-min-sec}.
# instead of manually making on up every commit, I'd like to automate it.
PATCHNAME=$(date +%Y%m%d%k%M%S)
# 'commit' will tell darcs to record all (-a) changes using the patch name as mentioned above.
# we also tell the darcs command to launch our default EDITOR to let us add a long comment.
# last, we'd like to add a signature to the patch by associated with our email address
alias commit='darcs record -a --patch-name=$PATCHNAME --edit-long-comment --author=alex.dong@you-mail.com'
alias diff='darcs whatsnew | less'
Showing posts with label shell. Show all posts
Showing posts with label shell. Show all posts
Tuesday, January 09, 2007
Subscribe to:
Posts (Atom)