Skip to content

Add autocompletion of 'exit' to shell #533

@jan-vcapgemini

Description

@jan-vcapgemini

As an IDEasy shell user I want to get the offer to exit the autocompletion mode when I type 'e'.

ATTENTION: For bash completion it does not make sense to suggest exit for completion of e since exit is not a commandlet and ide exit does not make any sense. Hence for the shell specific suggestion this needs to be implemented in a special way.

Hints:

A good start would be to use the AggregateCompleter like this in the ShellCommandlet.java:

Completer completer = new AggregateCompleter(
            new StringsCompleter("exit"), new IdeCompleter((AbstractIdeContext) this.context));

We could also try to use the SystemRegistry as this already has an exit command.
https://github.com/jline/jline3/wiki/Command-Registries#systemregistry

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions