For some purpose, together with /decide/homebrew/Cellar
(the trail to Homebrew’s Cellar on Apple Silicon units) in Alfred’s Search Scope would not work, no less than for Emacs.
However I discovered a extra generic resolution that ought to work for any software. The trick is to create an alias in /Functions
to the appliance’s .app
dir/bundle, after which to inform Alfred to incorporate macOS aliases in search outcomes.
I exploit Homebrew-installed Emacs for instance beneath as a result of generalizing the directions would make the language awkward. Extending the instance must be trivial.
First, create a macOS alias (not a symlink):
- In Finder, press ⌘shiftG and use Tab auto-complete to enter the trail of the listing containing “Emacs.app” (In my case, that is at the moment
/decide/homebrew/Cellar/emacs-mac/emacs-27.2-mac-8.3
) - Press ⌘⌥n to open a brand new Finder window, then ⌘shifta to go to
/Functions
- Create the alias by ⌘⌥ dragging “Emacs.app” from the homebrew window to the
/Functions
window.
Now, let’s make Alfred embrace macOS aliases in search outcomes:
- Open Alfred’s preferences (alfred 4.7), navigate to Options > Default Outcomes click on Superior…. A popup window will open that means that you can add file varieties that will probably be proven in search outcomes.
- Drag the
Emacs.app
alias from the Finder/Functions
window to the popup window. The brand new entry ought to learncom.apple.alias-file | alias
- Shut the popup and check out trying to find ’emacs’. The outcome record ought to embrace the “Emacs.app” alias.
The alias will fail at each replace that modifications the versioned path to the app within the Cellar, which occurs to be emacs-27.2-mac-8.3
at writing. The right resolution to the underlying drawback is to repair Alfred so it picks up purposes put in to /decide
. A hacky different may be to hook into homebrew
and recreate the alias when wanted.
I am going to in all probability manually recreate the alias every time it breaks in order that the breakage can function a reminder to verify for an upstream repair to the underlying drawback.