-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
functions in fish shell completion auto-generated file should not contain "-" character #1121
Comments
4 tasks
Thanks @umbynos. Line 350 in 94a87a7
It does not affect Fish, but if the program has a : in the name (not a good idea, but supported), it would cause problems.
I will post a PR that replaces both |
Fix in #1122 |
marckhouzam
added a commit
to VilledeMontreal/cobra
that referenced
this issue
Jun 29, 2020
Fixes spf13#1121. This is for programs that may contain a : or - in their name. Signed-off-by: Marc Khouzam <[email protected]>
marckhouzam
added a commit
to VilledeMontreal/cobra
that referenced
this issue
Jun 29, 2020
Fixes spf13#1121. This is for programs that may contain a : or - in their name. Signed-off-by: Marc Khouzam <[email protected]>
jharshman
pushed a commit
that referenced
this issue
Jul 10, 2020
Fixes #1121. This is for programs that may contain a : or - in their name. Signed-off-by: Marc Khouzam <[email protected]>
umbynos
added a commit
to arduino/arduino-cli
that referenced
this issue
Aug 10, 2020
umbynos
added a commit
to arduino/arduino-cli
that referenced
this issue
Aug 10, 2020
umbynos
added a commit
to arduino/arduino-cli
that referenced
this issue
Aug 10, 2020
umbynos
added a commit
to arduino/arduino-cli
that referenced
this issue
Aug 10, 2020
* update cobra to get new zsh completion spf13/cobra@2c5a0d3 and to fix this spf13/cobra@675ae5f * add --no-descriptions also for zsh * update docs * update tests * removed hack spf13/cobra#1121
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As asked by @marckhouzam here, I'm opening this issue.
I'm working on this PR and I noticed a problem with the auto-generated cobra completion file for fish shell: If the root command to complete contains a dash character in the name "-" (e.g.
arduino-cli
) the autocompletion will not work because of function naming (a function called__arduino-cli_comp_do_file_comp
is created). For reference: fish-shell/fish-shell#1206To fix this I simply replaced "-" with "_" here. But maybe it's better to fix this behaviour in cobra? Something like: if the command name contains a dash character automatically is replaced with an underscore.
The text was updated successfully, but these errors were encountered: