aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-09-07 08:16:11 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-09-07 08:16:11 -0700
commitc6d98885c7824a94cd9c4395ea3f37f18b647460 (patch)
treed6d1e4bfc0f1469d2d11a9363d9863c5fd34afd3
parenta6f064940212983290c3c509ea5a8b53eeedad9c (diff)
downloaddotfiles-c6d98885c7824a94cd9c4395ea3f37f18b647460.tar.gz
better keymap handling in zshrc
-rw-r--r--.zshrc46
1 files changed, 23 insertions, 23 deletions
diff --git a/.zshrc b/.zshrc
index 319bc9e..d848f6a 100644
--- a/.zshrc
+++ b/.zshrc
@@ -99,29 +99,29 @@ ZSH_HIGHLIGHT_STYLES[double-quoted-argument]="fg=red"
################# KEYBINDINGS #################
typeset -g -A key
-key[F1]='^[[11~'
-key[F2]='^[[12~'
-key[F3]='^[[13~'
-key[F4]='^[[14~'
-key[F5]='^[[15~'
-key[F6]='^[[17~'
-key[F7]='^[[18~'
-key[F8]='^[[19~'
-key[F9]='^[[20~'
-key[F10]='^[[21~'
-key[F11]='^[[23~'
-key[F12]='^[[24~'
-key[Backspace]='^?'
-key[Insert]='^[[2~'
-key[Home]='^[[7~'
-key[PageUp]='^[[5~'
-key[Delete]='^[[3~'
-key[End]='^[[8~'
-key[PageDown]='^[[6~'
-key[Up]='^[[A'
-key[Left]='^[[D'
-key[Down]='^[[B'
-key[Right]='^[[C'
+[[ $key[F1] ]] || key[F1]='^[[11~'
+[[ $key[F2] ]] || key[F2]='^[[12~'
+[[ $key[F3] ]] || key[F3]='^[[13~'
+[[ $key[F4] ]] || key[F4]='^[[14~'
+[[ $key[F5] ]] || key[F5]='^[[15~'
+[[ $key[F6] ]] || key[F6]='^[[17~'
+[[ $key[F7] ]] || key[F7]='^[[18~'
+[[ $key[F8] ]] || key[F8]='^[[19~'
+[[ $key[F9] ]] || key[F9]='^[[20~'
+[[ $key[F10] ]] || key[F10]='^[[21~'
+[[ $key[F11] ]] || key[F11]='^[[23~'
+[[ $key[F12] ]] || key[F12]='^[[24~'
+[[ $key[Backspace] ]] || key[Backspace]='^?'
+[[ $key[Insert] ]] || key[Insert]='^[[2~'
+[[ $key[Home] ]] || key[Home]='^[[7~'
+[[ $key[PageUp] ]] || key[PageUp]='^[[5~'
+[[ $key[Delete] ]] || key[Delete]='^[[3~'
+[[ $key[End] ]] || key[End]='^[[8~'
+[[ $key[PageDown] ]] || key[PageDown]='^[[6~'
+[[ $key[Up] ]] || key[Up]='^[[A'
+[[ $key[Left] ]] || key[Left]='^[[D'
+[[ $key[Down] ]] || key[Down]='^[[B'
+[[ $key[Right] ]] || key[Right]='^[[C'
bindkey ${key[Backspace]} backward-delete-char
bindkey ${key[Insert]} overwrite-mode