Class PicocliCommands
java.lang.Object
picocli.shell.jline3.PicocliCommands
- All Implemented Interfaces:
org.jline.console.CommandRegistry
Compiles SystemCompleter for command completion and implements a method commandDescription() that provides command descriptions
for JLine TailTipWidgets to be displayed in terminal status bar.
SystemCompleter implements the JLine 3
Completer interface. SystemCompleter generates completion
candidates for the specified command line based on the CommandLine.Model.CommandSpec that this PicocliCommands was constructed with.- Since:
- 4.1.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCommand that clears the screen.static classCommand factory that is necessary for applications that want the use theClearScreensubcommand.Nested classes/interfaces inherited from interface org.jline.console.CommandRegistry
org.jline.console.CommandRegistry.CommandSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.jline.console.CmdDesccommandDescription(String command) org.jline.console.CmdDesccommandDescription(List<String> args) commandInfo(String command) org.jline.reader.impl.completer.SystemCompleterbooleanhasCommand(String command) name()Returns the name shown for this collection of picocli commands in the usage help message.voidSets the name shown for this collection of picocli commands in the usage help message.
-
Constructor Details
-
PicocliCommands
public PicocliCommands(picocli.CommandLine cmd)
-
-
Method Details
-
hasCommand
- Specified by:
hasCommandin interfaceorg.jline.console.CommandRegistry- Parameters:
command-- Returns:
- true if PicocliCommands contains command
-
compileCompleters
public org.jline.reader.impl.completer.SystemCompleter compileCompleters()- Specified by:
compileCompletersin interfaceorg.jline.console.CommandRegistry
-
commandDescription
-
commandInfo
-
invoke
-
execute
-
commandNames
-
commandAliases
-
commandDescription
-
name
Returns the name shown for this collection of picocli commands in the usage help message. If not set withname(String), this returnsCommandRegistry.name().- Specified by:
namein interfaceorg.jline.console.CommandRegistry- Returns:
- the name shown for this collection of picocli commands in the usage help message
-
name
Sets the name shown for this collection of picocli commands in the usage help message.- Parameters:
newName- the new name to show
-