Skip to content

Commit b2415b9

Browse files
authored
Fix completion for Fire(fn) (google#336)
1 parent 7b5d4f7 commit b2415b9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

fire/completion.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ def _GetOptsAssignmentTemplate(command):
156156
return opts_assignment_subcommand_template
157157

158158
lines = []
159-
for command in set(subcommands_map.keys()).union(set(options_map.keys())):
159+
commands_set = set()
160+
commands_set.add(name)
161+
commands_set = commands_set.union(set(subcommands_map.keys()))
162+
commands_set = commands_set.union(set(options_map.keys()))
163+
for command in commands_set:
160164
opts_assignment = _GetOptsAssignmentTemplate(command).format(
161165
options=' '.join(
162166
sorted(options_map[command].union(subcommands_map[command]))

0 commit comments

Comments
 (0)