Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6754

groovysh positional argument terminates groovysh after evaluation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.4.0-beta-1
    • Groovysh
    • None

    Description

      groovy can be invoked passing a script via the -e param, e.g.

      $ groovy -e 'print 1+1'
      2

      groovy can also run a script file that is passed as positional argument:

      $ groovy foo.groovy
      Hello World

      For some reason, groovysh has no -e option, but allos passing a script as positional argument. However, when passing this, groovysh evaluates and then shuts down, seemingly without benefit over the groovy -e command.

      Also see this discussion (from 2010): http://groovy.329449.n5.nabble.com/groovy-equivalent-to-quot-python-i-lt-script-py-gt-quot-td372587.html

      So i suggest to make groovysh parameters consistent with the groovy command, but that groovysh does not terminate after evaluation.

      Attachments

        Activity

          People

            pschumacher Pascal Schumacher
            tkruse Thibault Kruse
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: