Paul King created GROOVY-11895:
----------------------------------
Summary: Allow arguments to be set in groovyConsole
Key: GROOVY-11895
URL: https://issues.apache.org/jira/browse/GROOVY-11895
Project: Groovy
Issue Type: Improvement
Components: Groovy Console
Reporter: Paul King
Assignee: Paul King
Currently there is no way to set arguments passed to the executing script.
The common workaround is to have a first line overriding the args value in the
binding, e.g.:
{code}
args = ['arg1', 'arg2', 'arg3']
{code}
This PR provides a way to set space-separated arguments via a "Set Script
Arguments" option in the Script menu.
If both the "menu set" value has been set and the workaround is in place,
the menu set value is passed to the script, but the first-line workaround
overrides the passed in value.
For the rare case where space-separated won't work, the old workaround is still
available:
{code}
args = ['arg one', 'arg two']
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)