Skip to content

Commit

Permalink
man: fall back to _parse_usage for _parse_help
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed May 14, 2019
1 parent 2baab4f commit 2e1cb45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion completions/man
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ _man()
$split && return

if [[ $cur == -* ]]; then
COMPREPLY=( $(compgen -W '$(_parse_help "$1" -h)' -- "$cur") )
local opts=$(_parse_help "$1" -h)
COMPREPLY=( $(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return
fi
Expand Down

0 comments on commit 2e1cb45

Please sign in to comment.