/list print the commands that you entered in order.
jshell> /list
   1 : int x;
   2 : x
   3 : x=20
   4 : x = 30
   5 : x = 40
   7 : int a = 20;
   8 : a
Numbers 1, 2, 3… represent snippet ids. Execute the command '/list {snippet_id}' to get the information about specific snippet.
jshell> /list 5
   5 : x = 40
'/list -all' command is used to list all the snippets including failed, overwritten, dropped, and startup.
jshell> /list -all
  s1 : import java.io.*;
  s2 : import java.math.*;
  s3 : import java.net.*;
  s4 : import java.nio.file.*;
  s5 : import java.util.*;
  s6 : import java.util.concurrent.*;
  s7 : import java.util.function.*;
  s8 : import java.util.prefs.*;
  s9 : import java.util.regex.*;
 s10 : import java.util.stream.*;
   1 : int x;
   2 : x
   3 : x=20
   4 : x = 30
   5 : x = 40
   6 : int a = 10;
   7 : int a = 20;
   8 : a
 
 
No comments:
Post a Comment