public
Last active

Creates aliases for all your mac applications without name clashes. e.g. 'preview' would open '/Applications/Preview.app'. To use, add this to your .bashrc.

  • Download Gist
.applications
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#
# Creates aliases for all your mac applications in $PATHS (defined
# below) without name clashes. e.g. 'preview' would open
# '/Applications/Preview.app'. To use, add this to your .bashrc.
#
# if [ -f ~/.applications ]; then
# . ~/.applications
# fi
#
PATHS="/Applications /Developer/Applications"
for p in $PATHS; do
for f in $p/*.app; do
a=`basename $f`
n=`echo $a | sed s/\.app// | tr '[A-Z]' '[a-z]' | tr '[. ]' '-'`
if [[ `which $n` == '' ]]; then
alias $n="open $f"
fi
done
done

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.