BoD Posted July 25, 2019 Share Posted July 25, 2019 Hi! I have a collection of shell scripts that I put in a specific folders. I'd like to do something like this: - press the Alfred hotkey - in the search bar, type a few characters (the start of my script name) - have auto-completion/suggestion and use it to choose the script I want to execute - press enter to run it. If one day I add a new script in this folder, I want the autocompletion to "just work" (without having to go to Alfred's settings) Is there any way I could do this? Thanks a lot! Link to comment
deanishe Posted July 25, 2019 Share Posted July 25, 2019 You could use a File Filter pointed at your scripts directory. Connect it to a Run Script action with Language = /bin/bash and a Script of ./"$1" (or something like that). You might prefer a Run Terminal Command action if your scripts are interactive. Link to comment
BoD Posted July 29, 2019 Author Share Posted July 29, 2019 Wow thanks a lot! It worked like a charm. Just one question: I used a keyword, and when using it, I see my scripts in the suggested list, but I also see other things. Is there a way to filter and only show my scripts in there? In the screenshot, you can see my keyword is `q`, my scripts all start with `q_`, but in the list, items 2 and 3 are actually bookmarks, so not from my script folder. Ideas? Thanks a lot! Link to comment
Vero Posted July 29, 2019 Share Posted July 29, 2019 @BoD Change the bookmarks feature (under Features > Web Bookmarks) to show bookmarks "via keyword" instead of "in default results". That way, you'll use "bm" (or a keyword of your choice) followed by a bookmark's name to search for bookmarks, and they won't show up in default results. Cheers, Vero Link to comment
BoD Posted July 29, 2019 Author Share Posted July 29, 2019 But I like to have my bookmarks there by default No way to filter out content only for my specific keyword? Link to comment
deanishe Posted July 29, 2019 Share Posted July 29, 2019 The simplest way is to use a keyword that doesn’t match a bunch of other stuff. “.q” instead of just “q”, for example, if you want something short. BoD 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now