Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8192860

DOC: jshell Tool Reference -- jshell-specific shortcuts not documented

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 9, 10
    • docs

      Of these, only <tab> completion is documented --

      jshell> /help shortcuts
      |
      | shortcuts
      |
      | Supported shortcuts include:
      |
      | <tab>
      | After entering the first few letters of a Java identifier,
      | a jshell command, or, in some cases, a jshell command argument,
      | press the <tab> key to complete the input.
      | If there is more than one completion, then possible completions will be shown.
      | Will show documentation if available and appropriate.
      |
      | Shift-<tab> v
      | After a complete expression, hold down <shift> while pressing <tab>,
      | then release and press "v", the expression will be converted to
      | a variable declaration whose type is based on the type of the expression.
      |
      | Shift-<tab> m
      | After a complete expression or statement, hold down <shift> while pressing <tab>,
      | then release and press "m", the expression or statement will be converted to
      | a method declaration. If an expression, the return type is based on the type
      | of the expression.
      |
      | Shift-<tab> i
      | After an unresolvable identifier, hold down <shift> while pressing <tab>,
      | then release and press "i", and jshell will propose possible imports
      | which will resolve the identifier based on the content of the specified classpath.


      Note: Shift-<tab> m -- was added in JDK 10.

            jgordon Joni Gordon (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: