about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-05-08 06:50:13 +0200
committeraszlig <aszlig@nix.build>2020-05-08 06:50:13 +0200
commit455048f6f339e4f0a21602ff8a2f56d61de989a7 (patch)
tree049a1076218a1fd5387938169e560272c941bd77
parent2f9d7edb660a41e282fd9001e433b9530412f08b (diff)
zsh: Fix XTerm-specific shell initialisation
In 7faaaab0af1e30bdfb72eca02abdfe92efefe4e0, I've changed the TERM
variable to contain "xterm-256color".

However, in our shell initialisation, we check whether $TERM is "xterm"
rather than whether $TERM *starts* with xterm.

Doing the latter fixes title setting and home/end keys in Vi normal
mode.

Signed-off-by: aszlig <aszlig@nix.build>
-rw-r--r--modules/user/aszlig/programs/zsh/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/user/aszlig/programs/zsh/default.nix b/modules/user/aszlig/programs/zsh/default.nix
index a97e000a..178fe09a 100644
--- a/modules/user/aszlig/programs/zsh/default.nix
+++ b/modules/user/aszlig/programs/zsh/default.nix
@@ -63,7 +63,7 @@ in {
       export KEYTIMEOUT=1
 
       bindkey -v
-      if [[ "$TERM" = xterm ]]; then
+      if [[ "$TERM" = xterm* ]]; then
         bindkey -v '\e[H' vi-beginning-of-line
         bindkey -v '\e[F' vi-end-of-line