Skip to content

Commit

Permalink
fix(curl,koji): use _comp_compgen_help
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed May 21, 2023
1 parent e916f83 commit f37f221
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions completions/curl
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ _comp_cmd_curl()

if [[ $cur == -* ]]; then
_comp_compgen_help -- --help all
[[ ${COMPREPLY-} ]] ||
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
[[ ${COMPREPLY-} ]] || _comp_compgen_help
fi
} &&
complete -F _comp_cmd_curl curl
Expand Down
2 changes: 1 addition & 1 deletion completions/koji
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ _comp_cmd_koji()
fi

if [[ $cur == -* ]]; then
COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
_comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
elif [[ ! $has_command ]]; then
COMPREPLY=($(compgen -W '$("$1" --help-commands 2>/dev/null | \
Expand Down

0 comments on commit f37f221

Please sign in to comment.