type: Make "--help" work

This tripped over argparse --min-args=1, but we already return 1 above
if there really is no argument.

Fixes #5361.
This commit is contained in:
Fabian Homborg 2018-11-22 12:27:25 +01:00
parent c729a97c43
commit b383e29a24

View file

@ -4,7 +4,7 @@ function type --description 'Print the type of a command'
or return 1
set -l options 'h/help' 'a/all' 'f/no-functions' 't/type' 'p/path' 'P/force-path' 'q/quiet'
argparse -n type --min-args=1 -x t,p,P $options -- $argv
argparse -n type -x t,p,P $options -- $argv
or return
if set -q _flag_help