replace actionStr with action_name

This commit is contained in:
Isaac 2023-05-04 13:29:25 -07:00
parent b7fe2a5031
commit 062453af51
No known key found for this signature in database
GPG key ID: E69FB5A841448A48

View file

@ -109,8 +109,8 @@ def fish_completion():
+ ('\n# subparser completions',) + ('\n# subparser completions',)
+ tuple( + tuple(
'''complete -c borgmatic -a '%s' -d %s -f -n "not __fish_seen_subcommand_from %s"''' '''complete -c borgmatic -a '%s' -d %s -f -n "not __fish_seen_subcommand_from %s"'''
% (actionStr, shlex.quote(subparser.description), all_subparsers) % (action_name, shlex.quote(subparser.description), all_subparsers)
for actionStr, subparser in subparsers.choices.items() for action_name, subparser in subparsers.choices.items()
) )
+ ('\n# global flags',) + ('\n# global flags',)
+ tuple( + tuple(
@ -124,10 +124,10 @@ def fish_completion():
% ( % (
' '.join(action.option_strings), ' '.join(action.option_strings),
shlex.quote(action.help), shlex.quote(action.help),
actionStr, action_name,
build_fish_flags(action), build_fish_flags(action),
) )
for actionStr, subparser in subparsers.choices.items() for action_name, subparser in subparsers.choices.items()
for action in subparser._actions for action in subparser._actions
) )
) )