RFR 8179856: jshell tool: not suitable for pipeline use

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Sep 11 16:43:28 UTC 2017



On 9/11/17 9:35 AM, Robert Field wrote:
>
> On 09/11/17 02:30, Jan Lahoda wrote:
>> Hi Robert,
>>
>> Overall seems OK to me. One question: why use "--pipe" instead of 
>> simply "-" (which is AFAIK common option for "read stdin")?
>
> From Linux "cat" -----
>
> SYNOPSIS
>        cat [OPTION]... [FILE]...
>
> DESCRIPTION
>        ...
>
>        With no FILE, or when FILE is -, read standard input.
>
> EXAMPLES
>        cat f - g
>               Output f's contents, then standard input, then g's 
> contents.
>
>        cat    Copy standard input to standard output.
>
> ------------
>
> The jshell tool always reads from standard in (unless somehow aborted).
> This "--pipe" argument is an option, whereas "-" in the *nix world is 
> a file.
>
> The option does not change what is read, but how it is processed.
>
> But maybe that is too pedantic, and it still the natural choice.
>
> Thoughts?
>
> -Robert
>
>
>>
>> Jan
>>
>> On 24.8.2017 06:35, Robert Field wrote:
>>> Please review --
>>>
>>> Bugs:
>>>
>>>      8179856: jshell tool: not suitable for pipeline use
>>>      https://bugs.openjdk.java.net/browse/JDK-8179856
>>>
>>>      8186708: jshell tool: bad load file garbles message and does 
>>> not abort
>>>      https://bugs.openjdk.java.net/browse/JDK-8186708
>>>
>>> Webrev:
>>>
>>>      http://cr.openjdk.java.net/~rfield/8179856v1.webrev/
>>>
>>> Thanks,
>>> Robert
>>>
>

I think it would be a sufficiently non-standard use of "-" that an 
explicit option like --pipe would be better.

-- Jon



More information about the kulla-dev mailing list