-
Notifications
You must be signed in to change notification settings - Fork 120
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
Allow to customize the name of the command for completion #355
Comments
Thanks for the bug report! #356 fixes the command not generating completion for its parent. The completion output uses the command name. I could add an option to customize that, but the help and usage output also use the command name, so they would seemingly be incorrect. Does setting the root command name to match the script not work for you? e.g. |
My use case is kind of an edge case I guess. The jar is distributed on mavenCentral as #!/usr/bin/env kotlin
// To regenerate autocompletion, use:
// foo_cli.main.kts generate-completion --shell zsh --name foo_cli.main.kts > ~/.foo_cli_completion
@file:DependsOn("com.example:foo_cli:$latest")
import com.example.main
main(args) With that, it'd feel weird making the jar know about |
You could always add an optional script name parameter to your
Which is misleading if the user needs to enter |
The name of the main command in the code isn't always the same one as the name of the shell command being actually run. Typically, my main command is often named "main" and I then create scripts that launch the jar.
It would be nice to be able to customize that name for the purpose of completion
Edit: somewhat an overshoot of that issue but looks like
CompletionCommand
will always print the completion for itself?The text was updated successfully, but these errors were encountered: