Skip to content

Instantly share code, notes, and snippets.

@tastycode
Created January 10, 2012 06:48
Show Gist options
  • Save tastycode/1587498 to your computer and use it in GitHub Desktop.
Save tastycode/1587498 to your computer and use it in GitHub Desktop.
Bash Shortcuts
# create a shortcut for all applications
# shortcuts are launch_ e.g. to launch iPhoto = launch_iphoto
for app in /Applications/*.app
do
shortcut=`echo $app | ruby -ne 'puts "launch_"+File.basename($_).downcase.gsub(/.app/,"").gsub(/\s+/,"")'`
alias "$shortcut"="open $app"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment