Merge pull request #67225 from matthewbauer/tramp-zshrc-fix

nixos/zsh: Fix tramp support

authored by

Matthew Bauer and committed by
GitHub
13297036 e7581c29

+10 -3
+10 -3
nixos/modules/programs/zsh/zsh.nix
··· 69 69 70 70 promptInit = mkOption { 71 71 default = '' 72 - if [ "$TERM" != dumb ]; then 73 - autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp 74 - fi 72 + autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp 75 73 ''; 76 74 description = '' 77 75 Shell script code used to initialise the zsh prompt. ··· 212 210 ${zshAliases} 213 211 214 212 ${cfg.promptInit} 213 + 214 + # Need to disable features to support TRAMP 215 + if [ "$TERM" = dumb ]; then 216 + unsetopt zle prompt_cr prompt_subst 217 + unfunction precmd preexec 218 + unset RPS1 RPROMPT 219 + PS1='$ ' 220 + PROMPT='$ ' 221 + fi 215 222 216 223 # Read system-wide modifications. 217 224 if test -f /etc/zshrc.local; then