Copying text with Ctrl + C when the Zsh line editor is active
3
votes
1
answer
1477
views
I've added some keyboard shortcuts in my Zsh to enable selecting words.
In order for the selection to do something, I would like to use
Ctrl + C
to copy it. However I would also like to use Ctrl + C
to interrupt programs, when the Zsh Line Editor (ZLE) isn't active.
Is this possible and how can I do this? I tried to declare a function TRAPINT
to hook Ctrl + C
, however when I'm in the ZLE and hit Ctrl + C
, this function doesn't appear to be called.
Asked by simonzack
(752 rep)
Feb 16, 2021, 11:55 AM
Last activity: Feb 19, 2021, 03:37 AM
Last activity: Feb 19, 2021, 03:37 AM