AutoComplete (picocli 2.3.0 API)
Date: 2018-02-13

picocli

## Class AutoComplete

- java.lang.Object
- - picocli.AutoComplete

-     public class AutoComplete
      extends java.lang.Object

  Stand-alone tool that generates bash auto-complete scripts for picocli-based command line applications.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `bash(java.lang.String scriptName, CommandLine commandLine)` Generates and returns the source code for an autocompletion bash script for the specified picocli-based application.
    `static void` | `bash(java.lang.String scriptName, java.io.File out, java.io.File command, CommandLine commandLine)` Generates source code for an autocompletion bash script for the specified picocli-based application, and writes this script to the specified `out` file, and optionally writes an invocation script to the specified `command` file.
    `static void` | `main(java.lang.String... args)` Generates a bash completion script for the specified command class.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### main

          public static void main(java.lang.String... args)

      Generates a bash completion script for the specified command class.
      Parameters:
        `args` - command line options. Specify at least the `commandLineFQCN` mandatory parameter, which is the fully qualified class name of the annotated `@Command` class to generate a completion script for. Other parameters are optional. Specify `-h` to see details on the available options.

    - #### bash

          public static void bash(java.lang.String scriptName,
                  java.io.File out,
                  java.io.File command,
                  CommandLine commandLine)
                           throws java.io.IOException

      Generates source code for an autocompletion bash script for the specified picocli-based application, and writes this script to the specified `out` file, and optionally writes an invocation script to the specified `command` file.
      Parameters:
        `scriptName` - the name of the command to generate a bash autocompletion script for
        `commandLine` - the `CommandLine` instance for the command line application
        `out` - the file to write the autocompletion bash script source code to
        `command` - the file to write a helper script to that invokes the command, or `null` if no helper script file should be written
      Throws:
        `java.io.IOException` - if a problem occurred writing to the specified files

    - #### bash

          public static java.lang.String bash(java.lang.String scriptName,
                              CommandLine commandLine)

      Generates and returns the source code for an autocompletion bash script for the specified picocli-based application.
      Parameters:
        `scriptName` - the name of the command to generate a bash autocompletion script for
        `commandLine` - the `CommandLine` instance for the command line application
      Returns:
        source code for an autocompletion bash script