From 9ce947d6ea86dee257620c9efe6053fbd68904bf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 22 Apr 2021 08:13:57 +0530 Subject: [PATCH] Ignore failure to read the readline init file on Linux as well There are apparently people that like to break things randomly on their systems by removing needed files. Fixes #3513 --- kitty/shell.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kitty/shell.py b/kitty/shell.py index 19c49efdf..2bfd765a0 100644 --- a/kitty/shell.py +++ b/kitty/shell.py @@ -16,7 +16,7 @@ from .cli import ( title ) from .cli_stub import RCOptions -from .constants import cache_dir, is_macos, version, kitty_face +from .constants import cache_dir, version, kitty_face from .rc.base import ( RemoteCommand, all_command_names, command_for_name, display_subcommand_help, parse_subcommand_cli @@ -31,11 +31,8 @@ def match_commands() -> Tuple[str, ...]: def init_readline(readline: Any) -> None: - try: + with suppress(OSError): readline.read_init_file() - except OSError: - if not is_macos: - raise if 'libedit' in readline.__doc__: readline.parse_and_bind("bind ^I rl_complete") else: