Commit 11f3faa973d1

Vincent Demeester <vincent@sbr.pm>
2019-08-14 15:11:27
profiles.zsh: fix emacs tramp with zsh
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 5030534
Changed files (1)
modules
profiles
modules/profiles/zsh.nix
@@ -102,6 +102,16 @@ in
             print -P "\033AnSiTu %n"
             print -P "\033AnSiTc %d"
           fi
+          if [[ "$TERM" == "dumb" || "$TERM" == "emacs" ]]
+          then
+            TERM=eterm-color
+            unsetopt zle
+            unsetopt prompt_cr
+            unsetopt prompt_subst
+            unfunction precmd
+            unfunction preexec
+            PS1='$ '
+          fi
         '';
         profileExtra = ''
           if [ -e /home/vincent/.nix-profile/etc/profile.d/nix.sh ]; then . /home/vincent/.nix-profile/etc/profile.d/nix.sh; fi