only allow one parser
This commit is contained in:
parent
412d18f218
commit
2e658cfa56
1 changed files with 4 additions and 2 deletions
|
@ -65,6 +65,8 @@ def fish_completion():
|
||||||
'''
|
'''
|
||||||
top_level_parser, subparsers = arguments.make_parsers()
|
top_level_parser, subparsers = arguments.make_parsers()
|
||||||
|
|
||||||
|
all_subparsers = ' '.join(action for action in subparsers.choices.keys())
|
||||||
|
|
||||||
# Avert your eyes.
|
# Avert your eyes.
|
||||||
return '\n'.join(
|
return '\n'.join(
|
||||||
(
|
(
|
||||||
|
@ -78,8 +80,8 @@ def fish_completion():
|
||||||
'end',
|
'end',
|
||||||
'__borgmatic_check_version &',
|
'__borgmatic_check_version &',
|
||||||
) + tuple(
|
) + tuple(
|
||||||
'''complete -c borgmatic -a '%s' -d %s -f'''
|
'''complete -c borgmatic -a '%s' -d %s -f -n "not __fish_seen_subcommand_from %s"'''
|
||||||
% (actionStr, shlex.quote(subparser.description))
|
% (actionStr, shlex.quote(subparser.description), all_subparsers)
|
||||||
for actionStr, subparser in subparsers.choices.items()
|
for actionStr, subparser in subparsers.choices.items()
|
||||||
) + tuple(
|
) + tuple(
|
||||||
'''complete -c borgmatic -a '%s' -d %s -f'''
|
'''complete -c borgmatic -a '%s' -d %s -f'''
|
||||||
|
|
Loading…
Reference in a new issue