Skip to content

Commit

Permalink
Fix: ui_context: crmsh still complete even for unknown command
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxin1300 committed Nov 25, 2024
1 parent ae21432 commit 745383f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions crmsh/ui_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ def complete(self, line):
A space at the end of the line is significant.
'''
complete_next = line.endswith(' ')
# if complete_next:
# print >>sys.stderr, "complete_next is on"

# copy current state
prev_stack = list(self.stack)
Expand All @@ -137,7 +135,7 @@ def complete(self, line):
self.command_args = tokens
self.command_info = self.current_level().get_child(token)

if not self.command_info:
if not self.command_args and not self.command_info:
return self.current_level().get_completions()
if self.command_info.type == 'level':
self.enter_level(self.command_info.level)
Expand Down

0 comments on commit 745383f

Please sign in to comment.