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
1 changed files with 2 additions and 1 deletions

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',)