RFR 8157200: jshell tool: Add /retain command to persist settings

Robert Field robert.field at oracle.com
Fri May 20 16:18:31 UTC 2016


On 05/20/16 04:43, Jan Lahoda wrote:
> Hi Robert,
>
> Overall, seems OK to me. But I have a question: there appears to be no 
> way to un-retain stuff like modes or editor - should there be a way to 
> un-retain those?

Probably, yes.

There are four things that can be retained:

start:
There is always a start-up file, even if it is empty (which is not the 
default).  So, unsetting it or unretaining it would just be setting it 
to what you want.  Having a -default, and maybe a -none option on /set 
and /retain would probably be good.

editor:
editor is either set or, if unset, is editpad.  Having a -editpad or 
-default option would be good.

feedback:
feedback is always set to something.  So unset and unretain are covered 
by /set feedback normal

mode:
Added modes you no longer use would just be bloat/clutter they wouldn't 
interfere with anything.  Still, it would be nice to have a way to clean 
them up.  A -delete option on /set and /retain would do that.

Today I plan to work on these two bugs:
https://bugs.openjdk.java.net/browse/JDK-8157395
https://bugs.openjdk.java.net/browse/JDK-8157393

Can we discuss this more today and fold the solution into that work?   
And push this now, since it is really additional functionality that is 
being requested?

-Robert

P.S. /reset zeroes the JShell state, I would not want to overload the 
meaning of that command with something utterly unrelated

>
> Thanks,
>    Jan
>
> On 20.5.2016 05:57, Robert Field wrote:
>> Please review...
>>
>> Bugs:
>>          8157200: jshell tool: Add /retain command to persist settings
>>          https://bugs.openjdk.java.net/browse/JDK-8157200
>>
>>          8156910: jshell tool: crash when code with syntax error
>> contains format specifier
>>          https://bugs.openjdk.java.net/browse/JDK-8156910
>>
>> Webrev:
>>          http://cr.openjdk.java.net/~rfield/8157200v0.webrev/
>>
>> Thanks,
>> Robert
>>



More information about the kulla-dev mailing list