File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
picocli-shell-jline3/src/test/java/picocli/shell/jline3/example Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1010import org .jline .reader .LineReaderBuilder ;
1111import org .jline .reader .EndOfFileException ;
1212import org .jline .reader .UserInterruptException ;
13+ import org .jline .reader .ParsedLine ;
1314import org .jline .reader .impl .DefaultParser ;
1415import org .jline .reader .impl .LineReaderImpl ;
1516import org .jline .terminal .TerminalBuilder ;
@@ -112,7 +113,10 @@ public static void main(String[] args) {
112113 while (true ) {
113114 try {
114115 line = reader .readLine (prompt , rightPrompt , (MaskingCallback ) null , null );
115- CommandLine .run (commands , line .split ("\\ s+" ));
116+ ParsedLine pl = reader .getParser ().parse (line , 0 );
117+ String [] _args = new String [pl .words ().size ()];
118+ _args = pl .words ().toArray (_args );
119+ CommandLine .run (commands , _args );
116120 } catch (UserInterruptException e ) {
117121 // Ignore
118122 } catch (EndOfFileException e ) {
You can’t perform that action at this time.
0 commit comments