Skip to content

Cannot implement path auto-complete in windows, writing backslash and then pressing tab causes spring shell to throws EOFError: Escaped new line #240

@nhoze

Description

@nhoze

Environment: Windows 10
Steps to reproduce:

  1. Create a basic spring shell app with @ShellMethod foo that excepts String fileName param and print it.
  2. Run the spring shell in CMD.
    3.write foo --fileName, press \ and then tab

You get the following excpetion:
org.jline.reader.EOFError: Escaped new line
at org.springframework.shell.jline.ExtendedDefaultParser.parse(ExtendedDefaultParser.java:138) ~[spring-shell-core-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at org.jline.reader.impl.LineReaderImpl.doComplete(LineReaderImpl.java:3767) [jline-3.4.0.jar!/:na]
at org.jline.reader.impl.LineReaderImpl.expandOrComplete(LineReaderImpl.java:3696) [jline-3.4.0.jar!/:na]
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:548) [jline-3.4.0.jar!/:na]
at org.jline.reader.impl.LineReaderImpl.readLine(LineReaderImpl.java:390) [jline-3.4.0.jar!/:na]
at org.springframework.shell.jline.InteractiveShellApplicationRunner$JLineInputProvider.readInput(InteractiveShellApplicationRunner.java:115) ~[spring-shell-core-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at org.springframework.shell.Shell.run(Shell.java:125) ~[spring-shell-core-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at org.springframework.shell.jline.InteractiveShellApplicationRunner.run(InteractiveShellApplicationRunner.java:84) ~[spring-shell-core-2.0.0.RELEASE.jar!/:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:783) ~[spring-boot-2.0.6.RELEASE.jar!/:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:773) ~[spring-boot-2.0.6.RELEASE.jar!/:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.0.6.RELEASE.jar!/:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1242) ~[spring-boot-2.0.6.RELEASE.jar!/:2.0.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1230) ~[spring-boot-2.0.6.RELEASE.jar!/:2.0.6.RELEASE]
at com.cla.solr.SolrLogAnalyzerApplication.main(SolrLogAnalyzerApplication.java:10) ~[classes!/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_181]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[solr-log-analyzer-0.0.1-SNAPSHOT.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[solr-log-analyzer-0.0.1-SNAPSHOT.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) ~[solr-log-analyzer-0.0.1-SNAPSHOT.jar:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) ~[solr-log-analyzer-0.0.1-SNAPSHOT.jar:na]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions