summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2023-06-07 07:53:44 +0200
committerAlan Pearce2023-06-07 07:53:44 +0200
commit468e3de0842b7fbc4549557e1d261163be686582 (patch)
tree9f57cecd03e94c48ec9947e25c0bc68d16417fb0 /user
parent967c16845b0170460bf898bc8998c4a61689a0f0 (diff)
downloadnixfiles-468e3de0842b7fbc4549557e1d261163be686582.tar.lz
nixfiles-468e3de0842b7fbc4549557e1d261163be686582.tar.zst
nixfiles-468e3de0842b7fbc4549557e1d261163be686582.zip
zsh: fix broken prompt detection when using ssh
Diffstat (limited to 'user')
-rw-r--r--user/settings/zsh.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index 4ae24110..22899397 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -209,10 +209,13 @@ in
     '';
 
     initExtraFirst = ''
-      if [[ -r "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
-        source "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh"
+      if [[ $TERM != "dumb" ]]
+      then
+        if [[ -r "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then
+          source "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh"
+        fi
+        typeset -g POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
       fi
-      typeset -g POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
     '';
     initExtra =
       ''