Class BashCompletionGenerator<T>
- java.lang.Object
-
- com.github.rvesse.airline.help.common.AbstractUsageGenerator
-
- com.github.rvesse.airline.help.common.AbstractGlobalUsageGenerator<T>
-
- com.github.rvesse.airline.help.cli.bash.BashCompletionGenerator<T>
-
- All Implemented Interfaces:
GlobalUsageGenerator<T>
public class BashCompletionGenerator<T> extends AbstractGlobalUsageGenerator<T>
-
-
Field Summary
-
Fields inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
DEFAULT_COLUMNS
-
-
Constructor Summary
Constructors Constructor Description BashCompletionGenerator()
BashCompletionGenerator(boolean includeHidden, boolean enableDebugging)
Creates a new completion generator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BashCompletion
getCompletionData(ArgumentsMetadata arguments)
Gets the completion info for argumentsprotected BashCompletion
getCompletionData(OptionMetadata option)
Gets the completion info for an optionprotected BashCompletion
getCompletionData(Collection<Accessor> accessors)
void
usage(GlobalMetadata<T> global, OutputStream output)
-
Methods inherited from class com.github.rvesse.airline.help.common.AbstractGlobalUsageGenerator
findHelpSections, sortCommandGroups, usage
-
Methods inherited from class com.github.rvesse.airline.help.common.AbstractUsageGenerator
getCommandComparator, getOptionComparator, htmlize, includeHidden, sortArgumentsRestrictions, sortCommands, sortOptionRestrictions, sortOptions, toDefaultCommand, toDescription, toDescription, toSynopsisUsage, toUsage, toUsage
-
-
-
-
Constructor Detail
-
BashCompletionGenerator
public BashCompletionGenerator()
-
BashCompletionGenerator
public BashCompletionGenerator(boolean includeHidden, boolean enableDebugging)
Creates a new completion generator- Parameters:
enableDebugging
- Whether to enable debugging, when true the generated script will doset -o xtrace
in its functions andset +o xtrace
at the end of its functions
-
-
Method Detail
-
usage
public void usage(GlobalMetadata<T> global, OutputStream output) throws IOException
- Throws:
IOException
-
getCompletionData
protected BashCompletion getCompletionData(OptionMetadata option)
Gets the completion info for an option- Parameters:
option
- Option- Returns:
- Completion data,
null
if none specified
-
getCompletionData
protected BashCompletion getCompletionData(ArgumentsMetadata arguments)
Gets the completion info for arguments- Parameters:
arguments
- Arguments- Returns:
- Completion data,
null
if none specified
-
getCompletionData
protected BashCompletion getCompletionData(Collection<Accessor> accessors)
-
-