Closed reitzig closed 5 years ago
Currently, the pattern is
complete -c sdk -f -n '__fish_sdkman_no_command' -a 'cmd' -d 'Some command' complete -c sdk -f -n '__fish_sdkman_no_command' -a 'c' -d 'Some command' complete -c sdk -f -n '__fish_sdkman_using_command cmd' -a "(__fish_sdkman_candidates)" complete -c sdk -f -n '__fish_sdkman_using_command c' -a "(__fish_sdkman_candidates)"
These can be combined like so:
complete -c sdk -f -n '__fish_sdkman_no_command' -s 'c' -l 'cmd' -d 'Some command' complete -c sdk -f -n '__fish_sdkman_using_command cmd' -a "(__fish_sdkman_candidates)" # ?
This not only cleans up the code, but also removes the duplicates from the completion list.
Apply to all completions.
I spoke too quickly: -s and -l are only for -c and --long-c, that is with hyphens.
-s
-l
-c
--long-c
For sdk, we can use -a 'c long-c' which removes the redundancy from the sources, but not from the output.
-a 'c long-c'
Currently, the pattern is
These can be combined like so:
This not only cleans up the code, but also removes the duplicates from the completion list.
Apply to all completions.