Jump to content

Prefer “with input as argv” For Running Scripts


vitor

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
  • vitor locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...