Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions trepan/inout/ptk_bindkeys.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2024 Rocky Bernstein <rocky@gnu.org>
# Copyright (C) 2024-2025 Rocky Bernstein <rocky@gnu.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -37,12 +37,11 @@ def read_inputrc(read_init_file_fn: Callable, use_unicode: bool) -> None:
# GNU Readline inputrc $include's paths are relative to itself,
# so chdir to its directory before reading the file.
parent_dir = pathlib.Path(__file__).parent.absolute()
with parent_dir:
inputrc = "inputrc-unicode" if use_unicode else "inputrc-no-unicode"
try:
read_init_file_fn(str(parent_dir / "data" / inputrc))
except Exception:
pass
inputrc = "inputrc-unicode" if use_unicode else "inputrc-no-unicode"
try:
read_init_file_fn(str(parent_dir / "data" / inputrc))
except Exception:
pass


def read_init_file(path: str):
Expand Down