-
Hello, I would like to disable ctrl+d but only for one specific shell in a terminal which has a custom window title could I somehow disable it for just that shell? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Fish doesn't know the window title and the escape sequence to get it from the terminal is, from what I can find, not well-supported because of security concerns (see e.g. VTE's code, which sends a fake static title). I would recommend you find some other way to identify that window, like set your terminal to pass an environment variable. For example, if a variable NO_EXIT was set: bind \cd 'if set -q NO_EXIT; commandline -f delete-char; else; commandline -f delete-or-exit; end' Or just set ctrl-d to delete-char and use bind \cd delete-char |
Beta Was this translation helpful? Give feedback.
-
What's your terminal emulator ? |
Beta Was this translation helpful? Give feedback.
Fish doesn't know the window title and the escape sequence to get it from the terminal is, from what I can find, not well-supported because of security concerns (see e.g. VTE's code, which sends a fake static title).
I would recommend you find some other way to identify that window, like set your terminal to pass an environment variable.
For example, if a variable NO_EXIT was set:
Or just set ctrl-d to delete-char and use
exit
manually: