[ 
https://issues.apache.org/jira/browse/GROOVY-11895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070577#comment-18070577
 ] 

ASF GitHub Bot commented on GROOVY-11895:
-----------------------------------------

paulk-asert opened a new pull request, #2427:
URL: https://github.com/apache/groovy/pull/2427

   (no comment)




> 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
>            Priority: Major
>
> 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)

Reply via email to