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:
parent
0f23ad0d7e
commit
9ce947d6ea
@ -16,7 +16,7 @@ from .cli import (
|
|||||||
title
|
title
|
||||||
)
|
)
|
||||||
from .cli_stub import RCOptions
|
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 (
|
from .rc.base import (
|
||||||
RemoteCommand, all_command_names, command_for_name,
|
RemoteCommand, all_command_names, command_for_name,
|
||||||
display_subcommand_help, parse_subcommand_cli
|
display_subcommand_help, parse_subcommand_cli
|
||||||
@ -31,11 +31,8 @@ def match_commands() -> Tuple[str, ...]:
|
|||||||
|
|
||||||
|
|
||||||
def init_readline(readline: Any) -> None:
|
def init_readline(readline: Any) -> None:
|
||||||
try:
|
with suppress(OSError):
|
||||||
readline.read_init_file()
|
readline.read_init_file()
|
||||||
except OSError:
|
|
||||||
if not is_macos:
|
|
||||||
raise
|
|
||||||
if 'libedit' in readline.__doc__:
|
if 'libedit' in readline.__doc__:
|
||||||
readline.parse_and_bind("bind ^I rl_complete")
|
readline.parse_and_bind("bind ^I rl_complete")
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user