From 9854518c76fe4f1650e75542ad5aaea831dd5bb3 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Wed, 18 Sep 2019 22:01:12 +0100 Subject: [PATCH] Fix Home/End on Arch where $key is not auto setup --- zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/zshrc b/zshrc index ccc633d..8418175 100644 --- a/zshrc +++ b/zshrc @@ -131,8 +131,11 @@ bindkey -M vicmd '^V' edit-command-line # Enable HOME and END keys if [[ `uname` = Linux ]]; then - bindkey $key[Home] beginning-of-line - bindkey $key[End] end-of-line + # If Home and End are not working as expected setup zkbd mappings. + [ -f ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} ] && \ + source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} + [[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line + [[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line fi # Get the shells parent process name.