spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
734 stars 396 forks source link

Enable tab completion when buffer is empty #210

Closed fitzoh closed 6 years ago

fitzoh commented 6 years ago

If you hit tab on a blank line, nothing happens. It would be nice if a list of top level commands was generated as tab-completion options.

fitzoh commented 6 years ago

Apparently the secret is to do this to the lineReader bean:

lineReader.unsetOpt(LineReader.Option.INSERT_TAB);
ericbottard commented 6 years ago

Nice find, thanks @Fitzoh !