Package org.jline.builtins
Interface Completers.CompletionEnvironment
-
- Enclosing class:
- Completers
public static interface Completers.CompletionEnvironmentInterface defining the environment for command completion.This interface provides methods to access command information and evaluate completion expressions in a specific environment context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringcommandName(java.lang.String command)Gets the display name for a command.java.lang.Objectevaluate(org.jline.reader.LineReader reader, org.jline.reader.ParsedLine line, java.lang.String func)Evaluates a function in the current environment context.java.util.Set<java.lang.String>getCommands()Gets the set of available command names.java.util.Map<java.lang.String,java.util.List<Completers.CompletionData>>getCompletions()Gets the available completions for commands.java.lang.StringresolveCommand(java.lang.String command)Resolves a command name to its canonical form.
-
-
-
Method Detail
-
getCompletions
java.util.Map<java.lang.String,java.util.List<Completers.CompletionData>> getCompletions()
Gets the available completions for commands.- Returns:
- a map of command names to their completion data
-
getCommands
java.util.Set<java.lang.String> getCommands()
Gets the set of available command names.- Returns:
- a set of command names
-
resolveCommand
java.lang.String resolveCommand(java.lang.String command)
Resolves a command name to its canonical form.- Parameters:
command- the command name to resolve- Returns:
- the resolved command name
-
commandName
java.lang.String commandName(java.lang.String command)
Gets the display name for a command.- Parameters:
command- the command to get the name for- Returns:
- the display name of the command
-
evaluate
java.lang.Object evaluate(org.jline.reader.LineReader reader, org.jline.reader.ParsedLine line, java.lang.String func) throws java.lang.ExceptionEvaluates a function in the current environment context.- Parameters:
reader- the line readerline- the parsed command linefunc- the function to evaluate- Returns:
- the result of the evaluation
- Throws:
java.lang.Exception- if an error occurs during evaluation
-
-