kitty shell: Ignore failure to read readline history file

This commit is contained in:
Kovid Goyal 2018-06-22 17:23:01 +05:30
parent c037f53534
commit 32f22e0ada
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -84,8 +84,10 @@ class Completer:
return self.matches[state]
def __enter__(self):
if os.path.exists(self.history_path):
try:
readline.read_history_file(self.history_path)
except Exception:
pass
readline.set_completer(self.complete)
delims = readline.get_completer_delims()
readline.set_completer_delims(delims.replace('-', ''))