patgilmour Posted July 25, 2016 Share Posted July 25, 2016 Hi, The new Alfred 3 Snippets are great - they replaced a lot of other text managers on my Mac. One question: is it possible to create Snippets so that they will run directly as terminal commands (rather than having to create a Workflow element for each Terminal command I want to run). Example: "> killall PrinterProcessor" If I create this as a Snippet, I can't find a way to get it into the Alfred window without copy n paste. What I'd like to be able to do is invoke my snippet list, type (for example) 'killall', choose the snippet "> killall PrinterProcessor" and hit return to send it like any other Alfred command prefixed with > to the Terminal. I there a simple way to do this? Thanks, Pat Link to comment
deanishe Posted July 25, 2016 Share Posted July 25, 2016 Alfred doesn't expand snippets in its own query box. TBH, I'd post that as a feature request. Would probably be very useful, and Alfred gets on just fine with other snippet expansion apps. patgilmour 1 Link to comment
patgilmour Posted July 25, 2016 Author Share Posted July 25, 2016 Yeah, think I will – it's pretty slow creating a workflow element for every Terminal command. Alfred works perfectly with the other tools I was using – I just like it better so am migrating ;-). Link to comment
deanishe Posted July 25, 2016 Share Posted July 25, 2016 (edited) What were you using before? I tried to switch to Alfred after the whole TextExpander debacle, but couldn't because it lacks basic snippet features like cursor placement. Edited July 25, 2016 by deanishe Link to comment
patgilmour Posted July 25, 2016 Author Share Posted July 25, 2016 Feature Request: http://www.alfredforum.com/topic/9288-send-snippet-directly-to-terminal/ Link to comment
patgilmour Posted July 25, 2016 Author Share Posted July 25, 2016 I was using Dash mainly - it has a snippet function that allows cursor placement (multiple with tab) - but I can live with Alfred way of doing things. Most of the complex cursor placementstuff I only need when I'm in my text editor (Atom) and it handles that well. Link to comment
deanishe Posted July 25, 2016 Share Posted July 25, 2016 Yeah, I use UltiSnips (vim) for hardcore snippeting. Waaaay more powerful than any non-integrated snippet engine can be. Couldn't live without cursor placement, though. Have you tried Visual Studio Code? It's very much like Atom but massively less bloated and slow. Link to comment
patgilmour Posted July 26, 2016 Author Share Posted July 26, 2016 I'm on a MacBook Air 2011 and Atom runs okay here. Not as fast as my favorite – but too neglected by the taciturn developers – Espresso. I took a look at Visual Studio Code, but am kind of in the Atom way of things and it works okay for me. Link to comment
Vero Posted July 26, 2016 Share Posted July 26, 2016 As per my response in your other thread: If all you're looking to do is expand your snippets in Alfred, go to the Snippets preferences, click the cog and remove Alfred from the default ignore list. Keep in mind that this could have adverse effects, e.g. expanding when you're searching in the Snippets Viewer using the snippet's keyword. Cheers, Vero Link to comment
patgilmour Posted July 26, 2016 Author Share Posted July 26, 2016 Thanks Vero. The solution you suggest isn't too bad at all, but it requires more human memory I am capable of! It requires me remembering the expansion shortcuts for each of my commands. What would be ideal: - Invoke Snippets- Filter and select Snippet- Shift (or other modifier key) + Return to move this Snippet to the main Alfred execute window instead of pasting it. Possible? Thanks, Pat Link to comment
deanishe Posted July 26, 2016 Share Posted July 26, 2016 What does this have to do with snippets exactly? Are these commands you also run in Terminal, or are you just looking for a way to put a list of shell commands in Alfred and run them from there? 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