summary refs log tree commit diff
path: root/nixos/modules/programs/zsh/zsh.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-08-28 08:26:42 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2019-08-28 08:26:42 +0200
commit5061fe0c2c7743370e1d379d6fa60eed26ff1470 (patch)
tree4a4ee79a6e0694d3c7ad6fbeff33343d83458e6c /nixos/modules/programs/zsh/zsh.nix
parenta2538606e3115e16db2e5075ecf37b886ad64ede (diff)
parent98640fd48212f8e6552517f667bba1901f5936d4 (diff)
downloadnixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.tar
nixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.tar.gz
nixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.tar.bz2
nixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.tar.lz
nixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.tar.xz
nixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.tar.zst
nixpkgs-5061fe0c2c7743370e1d379d6fa60eed26ff1470.zip
Merge staging-next into staging
Diffstat (limited to 'nixos/modules/programs/zsh/zsh.nix')
-rw-r--r--nixos/modules/programs/zsh/zsh.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix
index 3f0c8262429..9816436cf95 100644
--- a/nixos/modules/programs/zsh/zsh.nix
+++ b/nixos/modules/programs/zsh/zsh.nix
@@ -69,9 +69,7 @@ in
 
       promptInit = mkOption {
         default = ''
-          if [ "$TERM" != dumb ]; then
-              autoload -U promptinit && promptinit && prompt walters
-          fi
+          autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp
         '';
         description = ''
           Shell script code used to initialise the zsh prompt.
@@ -213,6 +211,15 @@ in
 
         ${cfg.promptInit}
 
+        # Need to disable features to support TRAMP
+        if [ "$TERM" = dumb ]; then
+            unsetopt zle prompt_cr prompt_subst
+            unfunction precmd preexec
+            unset RPS1 RPROMPT
+            PS1='$ '
+            PROMPT='$ '
+        fi
+
         # Read system-wide modifications.
         if test -f /etc/zshrc.local; then
             . /etc/zshrc.local