Class BashCompletionGenerator<T>

All Implemented Interfaces:
GlobalUsageGenerator<T>

public class BashCompletionGenerator<T> extends AbstractGlobalUsageGenerator<T>
  • Constructor Details

    • 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 do set -o xtrace in its functions and set +o xtrace at the end of its functions
  • Method Details

    • usage

      public void usage(GlobalMetadata<T> global, OutputStream output) throws IOException
      Description copied from interface: GlobalUsageGenerator
      Generate the help and output it to the stream
      Parameters:
      global - Global metadata
      output - Stream to output to
      Throws:
      IOException - Thrown if there is a problem generating usage output
    • 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)