You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This generates a bash completion file 'bashCompletionTest', this file should include the following lines that define a 'my-test-subcommand' subcommand with options -f and --file
local cmd_subcmds="my-test-subcommand"local cmd_allsubcmds="my-test-subcommand"local cmd__my_test_subcommand_shortopts="-f"local cmd__my_test_subcommand_longopts="--file"local cmd__my_test_subcommand_optargs=""
Just source the file we just created with
source bashCompletionTest
Expected behavior
Tabbing on 'mycli my-test-subcommand -' i should see -f and --file as options, instead i don't see any possible completion
Additional context
I checked the logs and i found out that the completion script doesn't replace correctly all dashes and changes only the first one, so it searches for options of command my_test-subcommand (to be more precise checks variable cmd__my_test-subcommand_shortopts)
Possible fix
To fix just replace all instances of '-' instead of the first one only.
Describe the bug
The bash completion script doesn't suggest short and long options when using a subcommand containing more than one dash.
To Reproduce
Create a simple node program
This generates a bash completion file 'bashCompletionTest', this file should include the following lines that define a 'my-test-subcommand' subcommand with options -f and --file
Just source the file we just created with
Expected behavior
Tabbing on 'mycli my-test-subcommand -' i should see -f and --file as options, instead i don't see any possible completion
Additional context
I checked the logs and i found out that the completion script doesn't replace correctly all dashes and changes only the first one, so it searches for options of command my_test-subcommand (to be more precise checks variable cmd__my_test-subcommand_shortopts)
Possible fix
To fix just replace all instances of '-' instead of the first one only.
At line 196 of etc/dashdash.bash_completion.in :
The text was updated successfully, but these errors were encountered: