From 255cacf9127e11d84c104e821dd67a9c10afe50c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 14 Jul 2018 06:35:43 +0530 Subject: [PATCH] kitty shell prompt: fallback to plain ascii prompt in case of unicode errors --- kitty/shell.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kitty/shell.py b/kitty/shell.py index 35756077d..17f2af742 100644 --- a/kitty/shell.py +++ b/kitty/shell.py @@ -155,7 +155,10 @@ def real_main(global_opts): while True: try: - cmdline = input('🐱 ') + try: + cmdline = input('🐱 ') + except UnicodeEncodeError: + cmdline = input('kitty> ') except EOFError: break except KeyboardInterrupt: