Jump to content

Prefer “with input as argv” For Running Scripts

Recommended Posts

When running a script from Alfred, be it a Run Script Action or Script Filter Input, always prefer with input as argv over with input as {query}.

The former allows you to forego escaping the input so you can be confident whatever the user typed will be faithfully transmitted to the script. If you’re unsure how to pass your argument, see the placeholder text Alfred presents when switching languages: it teaches how to assign the input to a query variable. You do not have to do it specifically in that manner, acting on the input without assigning to a variable first works just as well.

Link to comment
Share on other sites

  • vitor changed the title to Prefer “with input as argv” For Running Scripts

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...