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
This commit is contained in:
Kovid Goyal 2021-04-22 08:13:57 +05:30
parent 0f23ad0d7e
commit 9ce947d6ea
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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: