vitor Posted January 2, 2015 Author Share Posted January 2, 2015 Update. Readded support for `tcsh` and `csh`, and made a few small modifications to the internals and to the interactions. Link to comment
vitor Posted January 13, 2015 Author Share Posted January 13, 2015 (edited) Update. Now even the option to run commands on selected files/directories will cd to the current Finder directory first. This is to allow commands that would create an output file to do it where you’d expect, instead of the workflow’s directory. Edited January 13, 2015 by Vítor Link to comment
vitor Posted October 28, 2015 Author Share Posted October 28, 2015 Update.Commands called with . will now only output large type when called with ⌘. Link to comment
vitor Posted November 6, 2015 Author Share Posted November 6, 2015 Update. Commands called with the File Action will now also only output large type when called with ⌘. Link to comment
vitor Posted November 6, 2015 Author Share Posted November 6, 2015 Update. If opt to not have the command’s output as large type, it’ll give you a notification when the command exits, with its status (success or error). Link to comment
vitor Posted August 6, 2016 Author Share Posted August 6, 2016 Update. Added support for fish. Also, it now uses OneUpdater, so this should be the last time you need to manually update. Link to comment
nikivi Posted August 7, 2016 Share Posted August 7, 2016 (edited) Will this workflow be compatible with Alfred 3? -- NORMAL -- Edited August 7, 2016 by nikivi Link to comment
vitor Posted August 8, 2016 Author Share Posted August 8, 2016 The workflow is compatible with Alfred 3, it’s just using a pre-release feature. See this github issue for details. Link to comment
vitor Posted September 2, 2016 Author Share Posted September 2, 2016 For those that did not have the pre-release of Alfred and hence could not use the latest version, the feature is now available on the latest Alfred stable. Link to comment
vitor Posted October 6, 2016 Author Share Posted October 6, 2016 Updated to use the most recent version of OneUpdater. Link to comment
vitor Posted March 26, 2017 Author Share Posted March 26, 2017 Update. Small fix to sub message on successes. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted April 25, 2017 Author Share Posted April 25, 2017 Update. Load more shell configuration files. Create temporary files differently. New icon. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted May 29, 2017 Author Share Posted May 29, 2017 (edited) Update. It now uses notificator for notifications. Please tell me if something goes wrong (if you get any error or stop receiving notifications). If everything works fine, I’d also be interested in knowing. Main reasons for the switch to notificator are in the DownVid post. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Edited May 29, 2017 by vitor Link to comment
Wesley Martin Posted November 19, 2019 Share Posted November 19, 2019 The runcommand Alfred workflow is my favorite workflow by far. Unfortunately the latest update has stopped working with Alfred 3 on my machine. I get a message saying that I need to update to the latest version of Alfred. I checked and I'm on the latest version of Alfred 3, but not sure if I have done something wrong with the update or if runcommand only works on Alfred 4 now. Is it possible to get an older version of runcommand so that i can carry on using it or if you have any advice on how I could get this latest version running on Alfred 3. Thank you. Wes. Link to comment
vitor Posted November 19, 2019 Author Share Posted November 19, 2019 9 hours ago, Wesley Martin said: The runcommand Alfred workflow is my favorite workflow by far. Thank you. And welcome to the forums. 9 hours ago, Wesley Martin said: Unfortunately the latest update has stopped working with Alfred 3 9 hours ago, Wesley Martin said: or if runcommand only works on Alfred 4 now. Yes, it’s because I’ve made a small update and any change to a Workflow makes it incompatible with older Alfred versions. I make and release these for free, so I don’t have the bandwidth to keep separate versions around. 9 hours ago, Wesley Martin said: Is it possible to get an older version of runcommand so that i can carry on using it Download this version and remove the pink OneUpdater node. You’ll no longer receive updates. Link to comment
Wesley Martin Posted November 19, 2019 Share Posted November 19, 2019 Thank you so much @vitor. I have gotten up and running again. Thank you so much for the work that you put into your workflows, I really appreciate your hard work! vitor 1 Link to comment
Monte Lin Posted July 25, 2022 Share Posted July 25, 2022 (edited) Hi, I appreciate so much that finally a smart guy came up to fill the most annoying void of Alfred. That said, after installed RunCommand and added '>' (with the option 'space' ticked'), I test it like this: > env <Cmd>+Enter> I expected to see an LargeType window filled with 'env' output, but nothing shown up. I also tried some othering: > /opt/local/x11/bin/xeyes <Enter>. I expected to see an animated eyes shown up in an X window. Again, nothing happened. > which eyes <Cmd>+<Enter> I expected to see '/opt/X11/bin/xeyes' in a LargeType window, but nothing happened. How can I be so unlucky? (I'm running it in Alfred 4, Mac Studio) Here added debug output of '> which xeyes' [17:55:26.861] Logging Started... [17:56:52.844] RunCommand[Keyword] Processing complete [17:56:52.852] RunCommand[Keyword] Passing output 'which xeyes' to Run Script [17:56:53.259] ERROR: RunCommand[Run Script] /var/folders/_j/_qtnjpj1345256smf04z2w8h0000z8/T/tmp.dfUizVYI: line 5: syntax error near unexpected token `newline' /var/folders/_j/_qtnjpj1345256smf04z2w8h0000z8/T/tmp.dfUizVYI: line 5: `xargs -0 -J {} which xeyes < ' [17:56:53.266] RunCommand[Run Script] Processing complete [17:56:53.267] RunCommand[Run Script] Passing output '' to Large Type Edited July 25, 2022 by Monte Lin Link to comment
vitor Posted July 25, 2022 Author Share Posted July 25, 2022 Welcome @Monte Lin, 2 hours ago, Monte Lin said: I appreciate so much that finally there is a workflow to run shell command without opening terminal (and why Alfred never comes to its mind to provide this functionality is beyond me). The Workflow has existed since 2013, so “finally” doesn’t really apply! It’s also not a very popular Workflow (probably, I don’t have real numbers) because it’s not something people need that often. Plus, it requires weird solutions to get right in that many shells. All that makes it so it’s the right decision for Alfred not to have this natively. Alfred doesn’t load the user’s environment by design, it’s a feature. This is exactly what Workflows are for. 2 hours ago, Monte Lin said: I expected to see an overlay window filled with 'env' output, but nothing shown up. Works for me. Open the debugger, set the log output to “All Information”, perform the failing action, and post the output. Link to comment
Monte Lin Posted July 26, 2022 Share Posted July 26, 2022 (edited) 17 hours ago, vitor said: Welcome @Monte Lin, The Workflow has existed since 2013, so “finally” doesn’t really apply! It’s also not a very popular Workflow (probably, I don’t have real numbers) because it’s not something people need that often. Plus, it requires weird solutions to get right in that many shells. All that makes it so it’s the right decision for Alfred not to have this natively. Alfred doesn’t load the user’s environment by design, it’s a feature. This is exactly what Workflows are for. Works for me. Open the debugger, set the log output to “All Information”, perform the failing action, and post the output. Vitor, glad to meet you. Here is the debug output by "> env <cmd>+<enter>" (I also select 'all Workflows" in the debugger setting: [13:15:17.504] RunCommand[Keyword] Processing complete [13:15:17.506] RunCommand[Keyword] Passing output 'env' to Run Script [13:15:17.849] ERROR: RunCommand[Run Script] /var/folders/ld/9n2t22k93hvgg3_kk6yl2mbw0000gn/T/tmp.xoZ8FNWj:6: parse error near `\n' [13:15:17.854] RunCommand[Run Script] Processing complete [13:15:17.855] RunCommand[Run Script] Passing output '' to Large Type I tested several times, all with the same error except the last part of '/var/folders....' path were different. I also got same error on X86 Mac. Thanks for your help. By the way, is RunCommand compatible with Alfred 5? Edited July 26, 2022 by Monte Lin Link to comment
vitor Posted July 26, 2022 Author Share Posted July 26, 2022 6 hours ago, Monte Lin said: By the way, is RunCommand compatible with Alfred 5? Yes. Alfred 5 doesn’t break compatibility with older Workflows. There might be a couple of cases where a tweak is needed (e.g. new functionality added to an old object), but it won’t be big. 6 hours ago, Monte Lin said: /var/folders/ld/9n2t22k93hvgg3_kk6yl2mbw0000gn/T/tmp.xoZ8FNWj:6: parse error near `\n' Can you share the file’s contents? Link to comment
Monte Lin Posted July 28, 2022 Share Posted July 28, 2022 (edited) On 7/26/2022 at 8:05 PM, vitor said: Yes. Alfred 5 doesn’t break compatibility with older Workflows. There might be a couple of cases where a tweak is needed (e.g. new functionality added to an old object), but it won’t be big. Can you share the file’s contents? Sorry for the late followup. The folder disappeared immedately afterward; I guess it's an auto-generated temporary. And thanks for the info. Edited July 28, 2022 by Monte Lin Link to comment
Monte Lin Posted August 3, 2022 Share Posted August 3, 2022 On 7/28/2022 at 10:02 PM, vitor said: What’s your shell? zsh on my Mac Studio (macOS 12.4) Brew's bash on my MacPro (macOS 10.14) Thanks. Link to comment
vitor Posted August 5, 2022 Author Share Posted August 5, 2022 I plan to update the Workflow, so I’ll look at it then. No ETA. You’re the only one having the issue, so I don’t want to make changes now and break it for someone else. From a quick look, the temporary file shouldn’t be getting deleted and shouldn’t even have 6 lines. Link to comment
Monte Lin Posted August 8, 2022 Share Posted August 8, 2022 (edited) I tried it again, the temp. file is available now: #!/bin/zsh setopt aliases source /etc/profile; source /etc/zprofile; source /etc/zshrc; source /Users/monte/.zprofile; source /Users/monte/.zshenv; cd '/Users/monte/Desktop/' xargs -0 -J {} env < The debug log is the same as previous: [12:09:48.949] Logging Started... [12:10:11.789] RunCommand[Keyword] Processing complete [12:10:11.790] RunCommand[Keyword] Passing output 'env' to Run Script [12:10:12.060] ERROR: RunCommand[Run Script] /var/folders/ld/9n2t22k93hvgg3_kk6yl2mbw0000gn/T/tmp.16WmCNXD:6: parse error near `\n' [12:10:12.066] RunCommand[Run Script] Processing complete [12:10:12.067] RunCommand[Run Script] Passing output '' to Large Type The command I issued: > env<cmd+Enter> I run the 'xargs -0 -J {} env <' command generated by your workflow directly in shell; similar error occurred ("parse error near '\n'"). If I omitted the '<' , xargs waited for my input to continue: ==> If I then input "me=monte", the environment was echoed with 'me=monte' appended as the last line. ==> If I instead just press 'C-d' without input anything, nothing was printed. I also tested the above in my MacPro (10.14, bash) and got same result. I also tested the above in a Ubuntu Linux 18.4 VM (in Parallel Desktop); similar error and results. Then, I tried adding ';' after the '{}' argument: xargs -0 -J {}; env xargs waited for my input. ==> I just press 'C-d' without input anything, environment is echoed as expected. It seems xargs doesn't accept '<' redirection. And I wonder why you need to indiscriminately pass user input to xargs? Isn't it up to user to determine if xargs processing is needed? I believe if your generated command was just 'env' than we'll get expected result. If for some reasons you think xargs is necessary, wouldn't the generated command 'env | xargs -0 -J {}' be more sensible? Thanks your help. Edited August 8, 2022 by Monte Lin 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