From 745383f4f5d513179d1ec558be80c0317f8b0bbf Mon Sep 17 00:00:00 2001 From: xin liang Date: Wed, 20 Nov 2024 15:23:34 +0800 Subject: [PATCH] Fix: ui_context: crmsh still complete even for unknown command --- crmsh/ui_context.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crmsh/ui_context.py b/crmsh/ui_context.py index 56088d4e3..f3bfa58fb 100644 --- a/crmsh/ui_context.py +++ b/crmsh/ui_context.py @@ -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) @@ -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)