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 70 promptInit = mkOption { 71 default = '' 72 - if [ "$TERM" != dumb ]; then 73 - autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp 74 - fi 75 ''; 76 description = '' 77 Shell script code used to initialise the zsh prompt. ··· 212 ${zshAliases} 213 214 ${cfg.promptInit} 215 216 # Read system-wide modifications. 217 if test -f /etc/zshrc.local; then
··· 69 70 promptInit = mkOption { 71 default = '' 72 + autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp 73 ''; 74 description = '' 75 Shell script code used to initialise the zsh prompt. ··· 210 ${zshAliases} 211 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 222 223 # Read system-wide modifications. 224 if test -f /etc/zshrc.local; then