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,16 +377,19 @@ 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.
if command in ("o", "open"): else:
self.open_url(words[1]) if command in ("o", "open"):
elif command == "forget-certificate": self.open_url(words[1])
from bebop.browser.gemini import forget_certificate elif command == "forget-certificate":
forget_certificate(self, words[1]) from bebop.browser.gemini import forget_certificate
elif command == "set-render-mode": forget_certificate(self, words[1])
self.set_render_mode(words[1]) elif command == "set-render-mode":
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):