support required actions
This commit is contained in:
parent
16ac4824a5
commit
d59b9b817f
1 changed files with 3 additions and 1 deletions
|
@ -69,6 +69,7 @@ def bash_completion():
|
||||||
|
|
||||||
# fish section
|
# fish section
|
||||||
|
|
||||||
|
|
||||||
def has_file_options(action: Action):
|
def has_file_options(action: Action):
|
||||||
return action.metavar in (
|
return action.metavar in (
|
||||||
'FILENAME',
|
'FILENAME',
|
||||||
|
@ -82,7 +83,8 @@ def has_choice_options(action: Action):
|
||||||
|
|
||||||
def has_required_param_options(action: Action):
|
def has_required_param_options(action: Action):
|
||||||
return (
|
return (
|
||||||
action.nargs
|
action.required is True
|
||||||
|
or action.nargs
|
||||||
in (
|
in (
|
||||||
"+",
|
"+",
|
||||||
"*",
|
"*",
|
||||||
|
|
Loading…
Reference in a new issue