Skip to content

Commit 24ab3dd

Browse files
authored
Merge pull request #6 from python-cmd2/tab_completion
Incorporate missing stuff from cmd2 related to tab-completion results
2 parents 1666a7d + e53748f commit 24ab3dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd2_submenu/submenu.py

+6
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,10 @@ def complete_submenu(_self, text, line, begidx, endidx):
170170
# Reset the submenu's tab completion parameters
171171
submenu.allow_appended_space = True
172172
submenu.allow_closing_quote = True
173+
submenu.completion_header = ''
173174
submenu.display_matches = []
175+
submenu.matches_delimited = False
176+
submenu.matches_sorted = False
174177

175178
return _complete_from_cmd(submenu, text, line, begidx, endidx)
176179
finally:
@@ -180,7 +183,10 @@ def complete_submenu(_self, text, line, begidx, endidx):
180183
# Pass the submenu's tab completion parameters back up to the menu that called complete()
181184
_self.allow_appended_space = submenu.allow_appended_space
182185
_self.allow_closing_quote = submenu.allow_closing_quote
186+
_self.completion_header = submenu.completion_header
183187
_self.display_matches = copy.copy(submenu.display_matches)
188+
_self.matches_delimited = submenu.matches_delimited
189+
_self.matches_sorted = submenu.matches_sorted
184190

185191
original_do_help = cmd_obj.do_help
186192
original_complete_help_command = cmd_obj.complete_help_command

0 commit comments

Comments
 (0)