browser: show unknown command error

This commit is contained in:
dece 2021-06-27 17:06:23 +02:00
parent ee9b637bae
commit 8d82c1bd53

View file

@ -377,9 +377,10 @@ class Browser:
self.open_home() self.open_home()
elif command in ("i", "info"): elif command in ("i", "info"):
self.show_page_info() self.show_page_info()
return else:
self.set_status_error(f"Unknown command '{command}'.")
# And commands with one or more args. # And commands with one or more args.
else:
if command in ("o", "open"): if command in ("o", "open"):
self.open_url(words[1]) self.open_url(words[1])
elif command == "forget-certificate": elif command == "forget-certificate":
@ -387,6 +388,8 @@ class Browser:
forget_certificate(self, words[1]) forget_certificate(self, words[1])
elif command == "set-render-mode": elif command == "set-render-mode":
self.set_render_mode(words[1]) self.set_render_mode(words[1])
else:
self.set_status_error(f"Unknown command '{command}'.")
def get_user_text_input(self, status_text, char, prefix="", strip=False, def get_user_text_input(self, status_text, char, prefix="", strip=False,
escape_to_none=False): escape_to_none=False):