RFR 8178992: jshell tool: missing references in /help /set mode

Robert Field robert.field at oracle.com
Fri Apr 21 18:23:52 UTC 2017


Please review ASAP.
Address several problems with the online documentation for /set mode

Bug:

     https://bugs.openjdk.java.net/browse/JDK-8178992

Webrev:

     http://cr.openjdk.java.net/~rfield/8178992v2.webrev/

New text 
-------------------------------------------------------------------------------------

jshell> /help /set mode
|  Create a user-defined feedback mode, optionally copying from an 
existing mode:
|
|       /set mode <new-mode> [<old-mode>] (-command|-quiet)
|
|  Retain a user-defined feedback mode for future sessions:
|
|       /set mode -retain <mode>
|
|  Delete a user-defined feedback mode:
|
|       /set mode -delete [-retain] <mode>
|
|  Show feedback mode settings:
|
|       /set mode [<mode>]
|
|  Where <new-mode> is the name of a mode you wish to create.
|  Where <old-mode> is the name of a existing feedback mode.
|  Where <mode> is the name of a existing feedback mode.
|
|  If <old-mode> is present, its settings are copied to the new mode.
|
|  The feedback that a mode provides for entered snippets is determined 
by the
|  '/set format' settings. However, for entered commands, feedback is 
either on or off,
|  as determined by the option used when creating the mode; Either the 
option '-command'
|  or the option '-quiet' must be specified. If '-command' is used, 
informative and
|  verifying command feedback is displayed when in the new mode.  If 
'-quiet' is used,
|  commands give only essential feedback (e.g., errors).
|
|  Once the new mode is created, use '/set format', '/set prompt' and 
'/set truncation'
|  to configure it.  Use '/set feedback' to use the new mode.
|
|  When the '-retain' option is used (without the '-delete' option), the 
mode (including
|  its current prompt, format, and truncation settings) will be stored 
for use in
|  future runs of the jshell tool.  If retain is not used, the mode is 
only defined in
|  the current session. After updating the mode's settings, retain the 
mode again to
|  preserve the updates across sessions.
|
|  When only the '-delete' option is used, the mode is deleted from the 
current session.
|  When both '-retain' and '-delete' are used, the mode is deleted from 
the current and
|  future sessions.
|
|  When the form without options is used, the mode settings are displayed.
|  When the <mode> is specified, only the mode settings for that mode 
are shown.
|  Note: the settings for the mode include the settings for prompt, 
format, and
|  truncation.
|  Example:
|       /set mode myformat
|
|  shows the mode, prompt, format, and truncation settings for the mode 
myformat

jshell>



Old text 
-------------------------------------------------------------------------------------

jshell> /help /set mode
|  Create a user-defined feedback mode, optionally copying from an 
existing mode:
|
|       /set mode <mode> [<old-mode>] [-command|-quiet|-delete]
|  Retain a user-defined feedback mode for future sessions:
|
|       /set mode -retain <mode>
|
|  Delete a user-defined feedback mode:
|
|       /set mode -delete [-retain] <mode>
|
|  Show feedback mode settings:
|
|       /set mode [<mode>]
|
|  Where <new-mode> is the name of a mode you wish to create.
|  Where <old-mode> is the name of a previously defined feedback mode.
|  If <old-mode> is present, its settings are copied to the new mode.
|  '-command' vs '-quiet' determines if informative/verifying command 
feedback is displayed.
|
|  Once the new mode is created, use '/set format', '/set prompt' and 
'/set truncation'
|  to configure it.  Use '/set feedback' to use the new mode.
|
|  When the -retain option is used, the mode (including its component 
prompt, format,
|  and truncation settings) will be used in this and future runs of the 
jshell tool.
|  When both -retain and -delete are used, the mode is deleted from the 
current
|  and future sessions.
|
|  The form without options shows the mode settings.
|  When the <mode> is specified only the mode settings for that mode are 
shown.
|  Note: the settings for the mode include the settings for prompt, 
format, and
|  truncation -- so these are displayed as well.
|  Example:
|       /set mode myformat
|  shows the mode, prompt, format, and truncation settings for the mode 
myformat

jshell>


More information about the kulla-dev mailing list