Fix Home/End on Arch where $key is not auto setup

This commit is contained in:
Kenneth Benzie 2019-09-18 22:01:12 +01:00
parent aab16bd355
commit 9854518c76

7
zshrc
View File

@ -131,8 +131,11 @@ bindkey -M vicmd '^V' edit-command-line
# Enable HOME and END keys # Enable HOME and END keys
if [[ `uname` = Linux ]]; then if [[ `uname` = Linux ]]; then
bindkey $key[Home] beginning-of-line # If Home and End are not working as expected setup zkbd mappings.
bindkey $key[End] end-of-line [ -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 fi
# Get the shells parent process name. # Get the shells parent process name.