We're updating the issue view to help you get more done. 

Allow recipe args to be used as environment variables for that command

Description

Recipes receive args via a manual argument binding process with placeholders like $name and $1. Now that we have proper env vars, set the args into the local env struct for the recipe so the standard environment expansions of ${name} and ${1} and ${name:default} can be used.

This also means the args will be available to any nested commands running from the recipe, which makes them more powerful and easier to specify default values. This also means users get programmatic access to them via the "env" namespace.

1 2 3 echo "You passed `env show | #structCount` arguments to this recipe" echo "They are as follows:" env show | foreach "echo '\${item} = \${value}'"

Leave the $name and $1 bindings in place for backwards compatibility.

Status

Assignee

Brad Wood

Reporter

Brad Wood

Labels

None

Fix versions

Priority

Major