How do I add a system link to the Applications folder and have it show up in spotlight.
Alternatively how do I add a specific folder to spotlight search priority. Easy to rearrange but I can not add anything.
A related question but not covering what I am interested in is:
Can I make a symlink (to a .app folder) in Applications directory show up in spotlight?
Best Answer
A Finder alias (not a symlink) will be added to spotlight, if it's sitting in a visible folder, like Applications.
You can create them programmatically using AppleScript (use
osascript
to integrate with other shell scripts.)To create an alias use
make alias file to {file to alias} at {destination of alias}
.By default (ie. if destination isn't specified) the alias is created on the current user's Desktop, ie.
~/Desktop
.Here's an example script to create an alias of a file in
/Applications
By the way,
osascript
accepts input from stdin, so to run an AppleScript in a shell script, using a heredoc will work. It may make it easier for you to setup the target file better: