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

DOC: jshell Tool Reference -- snippet ranges

XMLWordPrintable

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

      All commands which take snippet IDs take snippet ranges -- a range of snippets separated by a hypen.

      For example:

          /list 3-17
          /drop 3-17

      These list then drop snippets 3, 4, 5, ..., 16, 17

      The commands are /list, /vars, /method, /type, /edit, /drop, and /save.

      Additionally, the rerun-ID command allows ranges:

          /3-17

      Which reruns commands 3 through 17.

      Also missing in the reference, the rerun-ID command takes a list of IDs too:

         /4 8 9

      Well, actually, they all (the commands and rerun command) take a list, the items of which may be an ID, an ID-range, or a name. The rerun command must start with an ID or ID-range.

         /save foo 4-72 99

         /4 1-3 c

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

              Created:
              Updated:
              Resolved: