09/21/11 21:30:06

Using Alfred to clone a GitHub repository

Benjamin Godard from CocoAbyss has had a very neat idea for Alfred:

"With version 0.9 came custom terminal commands[…]. It allows you to create shell command to execute via Alfred with a simple shortcut[…], and you can even execute a command without showing a terminal and the task will be done silently in the background. […] Only caveat, I need to know when the download is finished…

…But here comes Growl. When downloading Growl in the Extras folder you can install growlnotify which is a command line utility to use Growl.

So with these 2 things installed I created a custom terminal command with the shortcut git which looks like this:

cd ~/Desktop;git clone "{query}";/usr/local/bin/growlnotify -m "Github download complete" --image ~/Dropbox/Applications\ Data/Alfred/extensions/scripts/git/icon.png"

growlnotify is also available in homebrew. (brew info growlnotify or brew install growlnotify)
You can get a pretty Git icon from Wikimedia Commons.