admin管理员组文章数量:1122832
Currently I have a zsh custom (or alias) command - "openChrome" that open a new chrome window.
My question is, can we just straightaway type in "openChrome" in Spotlight (macOs) so that when I hit enter after entering the command, the zsh terminal command is trigger?
Currently when I type in "openChrome" into Spotlight and hit enter, a google search is made.
(No I am not looking to make a quick action file/script on my desktop).
If this feature is possible, please help / guide me. Would be a cool feature to have!
Currently I have a zsh custom (or alias) command - "openChrome" that open a new chrome window.
My question is, can we just straightaway type in "openChrome" in Spotlight (macOs) so that when I hit enter after entering the command, the zsh terminal command is trigger?
Currently when I type in "openChrome" into Spotlight and hit enter, a google search is made.
(No I am not looking to make a quick action file/script on my desktop).
If this feature is possible, please help / guide me. Would be a cool feature to have!
Share Improve this question asked Nov 22, 2024 at 9:07 Awshaf IshtiaqueAwshaf Ishtiaque 92110 silver badges13 bronze badges 1- One possibility: if you install Xcode, Spotlight will list any executable scripts on your system that match the search. This answer describes some of how it works, although it is aimed at solving the reverse issue of how to hide 'Developer' results. – Gairfowl Commented Nov 22, 2024 at 10:27
1 Answer
Reset to default 0In Finder:
- Go to Applications/Utilities
- Right-click the Terminal app and choose "Make Alias"
- Rename it to "openChrome".
In System Settings:
- Go to Spotlight and uncheck the options for "Siri Suggestions" and "Websites"
This should put your new command at the top of Spotlight's results when you type it.
Further reading: symbolic links.
本文标签: How to execute a zsh terminal command from macos Spotlight directlyStack Overflow
版权声明:本文标题:How to execute a .zsh terminal command from macos Spotlight directly? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304929a1932409.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论