Skip to content
Myr

Show both commands and 'required flags' instead of only 'required flags'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Eric Paris · committed by Eric Paris · parent a5f153e · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:bash_completions.go+5 added-5 removed
114 unmodified lines
115 return116 fi117118 local completions119 if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then120 completions=("${must_have_one_flag[@]}")121 elif [[ ${#must_have_one_noun[@]} -ne 0 ]]; then119 completions=("${commands[@]}")120 if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then121 completions=("${must_have_one_noun[@]}")123 else124 completions=("${commands[@]}")122 fi123 if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then124 completions+=("${must_have_one_flag[@]}")125 fi126 COMPREPLY=( $(compgen -W "${completions[*]}" -- "$cur") )127128 if [[ ${#COMPREPLY[@]} -eq 0 && ${#noun_aliases[@]} -gt 0 && ${#must_have_one_noun[@]} -ne 0 ]]; then129 COMPREPLY=( $(compgen -W "${noun_aliases[*]}" -- "$cur") )
473 unmodified lines