I recently updated my xonsh environment to xonsh 0.9.27 and prompt-toolkit 3.0.18 and in my headless Linux environment, I've started noticing that when I hit Option+Delete, I get a traceback:
Unhandled exception in event loop:
File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/input/vt100.py", line 168, in callback_wrapper
callback()
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/application/application.py", line 691, in read_from_input
self.key_processor.process_keys()
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 274, in process_keys
self._process_coroutine.send(key_press)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 186, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_processor.py", line 329, in _call_handler
handler.call(event)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 102, in call
result = self.handler(event)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/key_binding/bindings/named_commands.py", line 420, in backward_kill_word
unix_word_rubout(event, WORD=False)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/key_binding/bindings/named_commands.py", line 408, in unix_word_rubout
event.app.clipboard.set_text(deleted)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/clipboard/base.py", line 101, in set_text
self._clipboard().set_text(text)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/clipboard/base.py", line 52, in set_text
self.set_data(ClipboardData(text))
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/prompt_toolkit/clipboard/pyperclip.py", line 25, in set_data
pyperclip.copy(data.text)
File "/usr/local/google/home/jaraco/.local/pipx/venvs/xonsh/lib/python3.9/site-packages/pyperclip/__init__.py", line 336, in __call__
raise PyperclipException(EXCEPT_MSG)
Exception
Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit https://pyperclip.readthedocs.io/en/latest/index.html#not-implemented-error
I'm unsure who configures those bindings to cause Option+Delete to not only delete a word, but to put that word on the clipboard, but that behavior is concerning for two reasons:
The error above is obnoxious. Attempts to save to a non-existent clipboard should be suppressed.
In environments with a working clipboard, I want to be able to delete words without mutating the clipboard.
For the second reason, can you suggest how one can disable this behavior?
I recently updated my xonsh environment to xonsh 0.9.27 and prompt-toolkit 3.0.18 and in my headless Linux environment, I've started noticing that when I hit Option+Delete, I get a traceback:
I'm unsure who configures those bindings to cause Option+Delete to not only delete a word, but to put that word on the clipboard, but that behavior is concerning for two reasons:
For the second reason, can you suggest how one can disable this behavior?