rearrange to improve legability of the file

This commit is contained in:
Isaac 2023-05-04 18:11:13 -07:00
parent f1fd2e88dd
commit 28efc85660
No known key found for this signature in database
GPG key ID: E69FB5A841448A48

View file

@ -102,9 +102,10 @@ def fish_completion():
'end',
'__borgmatic_check_version &',
)
+ (f'''set --local subparser_condition "not __fish_seen_subcommand_from {all_subparsers}"''',)
+ ('\n# subparser completions',)
+ tuple(
f'''complete -c borgmatic -a '{action_name}' -d {shlex.quote(subparser.description)} -f -n "not __fish_seen_subcommand_from {all_subparsers}"'''
f'''complete -c borgmatic -n "$subparser_condition" -a '{action_name}' -d {shlex.quote(subparser.description)} -f'''
for action_name, subparser in subparsers.choices.items()
)
+ ('\n# global flags',)