Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for generating autocompletion script during the build #584

Closed
remkop opened this issue Jan 1, 2019 · 0 comments
Closed
Labels
theme: auto-completion An issue or change related to auto-completion type: doc 📘
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Jan 1, 2019

Based on @bobtiernay-okta 's example in #582.

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>exec-maven-plugin</artifactId>
  <version>${exec-maven-plugin.version}</version>
  <executions>
    <execution>
      <id>generate-autocompletion-script</id>
      <phase>package</phase>
      <goals>
        <goal>java</goal>
      </goals>
      <configuration>
        <mainClass>picocli.AutoComplete</mainClass>
        <arguments>
          <argument>--force</argument><!-- overwrite if exists -->
          <argument>--completionScript</argument>
          <argument>${project.build.directory}/mycommand_completion.sh</argument>
          <argument>com.mycompany.mypackage.MyCommand</argument><!-- replace with your class -->
        </arguments>
      </configuration>
    </execution>
  </executions>
</plugin>
@remkop remkop added type: doc 📘 theme: auto-completion An issue or change related to auto-completion labels Jan 1, 2019
@remkop remkop added this to the 3.9 milestone Jan 1, 2019
@remkop remkop closed this as completed in 1822e11 Jan 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: auto-completion An issue or change related to auto-completion type: doc 📘
Projects
None yet
Development

No branches or pull requests

1 participant