jshell tool: not suitable for pipeline use

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 10
    • Affects Version/s: 9, 10
    • Component/s: tools
    • b31

      The following shell command should produce a single line of output:

      $ (echo '1+1'; echo 'System.out.println("ans = "+$1)') | jshell -s | cat

      Instead it prints additional prompts and duplicates of the input snippets.

      That's not really a true "silent mode", in the sense of "make -s", "read -s", etc.

      This is surprising enough to be a bug. It also prevents jshell from being used (like other shells) in pipelines, networking scripts, etc.

            Assignee:
            Robert Field (Inactive)
            Reporter:
            John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: