From e08bfb3c1a2d97aa03bdc2ec72be8a7a68f9c406 Mon Sep 17 00:00:00 2001 From: "Morgan (hi/him)" Date: Mon, 11 Dec 2023 23:06:40 +0000 Subject: [PATCH] Add LInux Cheatsheet --- cheat/linux.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 cheat/linux.md diff --git a/cheat/linux.md b/cheat/linux.md new file mode 100644 index 0000000..0b99be0 --- /dev/null +++ b/cheat/linux.md @@ -0,0 +1,17 @@ +# How to show and change a key binding + +## key bindings +* Press `CTRL + V` +* Type the key for which you want to change the binding +* The prompt will display the character sequence produced by that key. +e.g : if after step 1 you press F12, you can get something like `^[[24~` +(More info : [In bash, how do I bind a function key to a command?](https://stackoverflow.com/a/4201274/2309958) and [Delete keymap and completely disable key in zsh](https://unix.stackexchange.com/a/320432/220566) ) + +## create a binding : +* `bind '"\e[24~":"~"'` +* `bind '"\e[24~":""'` +* `bind '"\e[24~":"who"'` +* `bind '"\e[24~":"ssh hostname\n"'` + +## remove a binding : +* `bind -x '"\e[24~":""'` \ No newline at end of file