Thursday, March 29, 2012

Assigning the Right App to a Shortcut (SymLink)

Assigning the Right App to a Shortcut (SymLink)

I have a number of files in the /tools directory of a git repo.  These things have no bearing on the app this repo is for, rather they are management scripts and handy commands I like to have on my desktop.  One particular script cutlery.sh would only open in Xcode.  No matter how many times I opened it with "other" and chose MacVim to open it, it would revert to Xcode by default.  Sort of wrecked the convenience of the thing.


To change the way a link opens:

  1. Delete the existing link.
  2. Right click the source file (the file you want to point the link to) by right clicking and choosing "other". Choose the application you want to open with and be sure to set the check box below the list to "Always open with this"
  3. Click OK.
  4. Now create the link:  ln -sv ~/projects/tools/cutlery.sh CUTLERY