Fix key bindings with screen TERM
authorMikael Berthe <mikael@lilotux.net>
Sun, 02 May 2021 12:58:39 +0200
changeset 48 604330c024f4
parent 47 f25fda256b1d
child 49 06af8cc97cc1
Fix key bindings with screen TERM
zshrc.d/10-default-bindings.zrc
--- a/zshrc.d/10-default-bindings.zrc	Sun Apr 25 13:40:43 2021 +0200
+++ b/zshrc.d/10-default-bindings.zrc	Sun May 02 12:58:39 2021 +0200
@@ -17,14 +17,14 @@
 bindkey -s '' '^[,'
 
 if [[ $TERM == "console" || $TERM == "vt100" || $TERM == linux* ||
-      $TERM == xterm* || $TERM == tmux* ]]
+      $TERM == xterm* || $TERM == screen* || $TERM == tmux* ]]
 then
   bindkey '^[[1~' beginning-of-line       # Home
   bindkey '^[[4~' end-of-line             # End
 fi
 
 # Dans un xterm term=linux
-if [[ -z ${TERM:#linux*} || -z ${TERM:#screen} ]]; then
+if [[ $TERM == linux* ]]; then
   bindkey '^[[H'  beginning-of-line       # Home
   bindkey '^[[F'  end-of-line             # End
 fi