groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cyprushelp <cyprush...@gmail.com>
Subject Groovysh in non-interactive mode
Date Fri, 05 Feb 2016 02:13:50 GMT
Hello,

Groovysh no longer works in non-interactive mode.

1) Before Groovy 2.4, you could run groovysh in non-interactive mode. It
would execute the action and then quit. This made it useful when embedding
in shell scripts etc.
2) Before Groovy 2.4, you could pass arguments to groovysh in
non-interactive mode. For example, I had some custom commands which I could
execute not only from within the shell, but also outside of the shell.

Both these features seem to be gone in latest Groovy 2.4.5 release. They
were useful and a lot of code depended on them. I wonder if someone has any
workarounds. I am not sure if the changes in
https://issues.apache.org/jira/browse/GROOVY-6754 caused this.

Before (groovy 2.3.9):
user@machine:~$ groovysh :show all
No variables defined
No classes have been loaded
No custom imports have been defined
Preferences:
    verbose=false
===> [null, null, null, null]
user@machine:~$

After (groovy 2.4.5):
user@machine:~/opt/groovy-2.4.5/bin$ ./groovysh :show all
Groovy Shell (2.4.5, JVM: 1.8.0_51)
Type ':help' or ':h' for help.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
groovy:000> :load :show
File not found: ":show"
groovy:000> :load all
File not found: "all"
groovy:000>

Mime
View raw message