Smpl Posted March 6, 2022 Share Posted March 6, 2022 So I have 2 List Filters setup which output to the "arg and var" I need (or at least I think I do) to output those to a "Run Script" action but its not working as I hoped. curl -d '' "http://{var:server}:8001/command/{var:action}" This is the script I'm trying to run, replacing the var with the output of each of the List Filters When I dump it to the "Copy to Clipboard" output everything looks fine. The expected data for each List Filter is replacing the var where it should. I have the Run Script action set to /bin/bash, with input as argv, but that doesn't work I tried setting Run Script action to "with input as query" with escaping set to "brackets" but then that is not working with the variables set from the List Filters. Link to comment
vitor Posted March 6, 2022 Share Posted March 6, 2022 Those variables go into the Run Script as environment variables. Otherwise Alfred would have to do all those substitutions (which could mess up your code) and they would not be available if you were calling external script. You need to do: curl -d '' "http://${server}:8001/command/${action}" Smpl 1 Link to comment
Smpl Posted March 6, 2022 Author Share Posted March 6, 2022 (edited) On 3/6/2022 at 2:44 PM, vitor said: Those variables go into the Run Script as environment variables. Otherwise Alfred would have to do all those substitutions (which could mess up your code) and they would not be available if you were calling external script. You need to do: curl -d '' "http://${server}:8001/command/${action}" Thanks @vitor that worked perfectly! Edited March 8, 2022 by Smpl 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