git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #67225 from matthewbauer/tramp-zshrc-fix

nixos/zsh: Fix tramp support

commit13297036160b54693048f2e62387671f5fa9f047 authorMatthew Bauer <mjbauer95@gmail.com> dateFri 23 Aug 2019, 15:14 (7 years ago) parente7581c2ac773d1
1 file changed+10−3
nixos/modules/programs/zsh/zsh.nix+10−3
nixos/modules/programs/zsh/zsh.nix+10−3
@@ -69,9 +69,7 @@ in
6969
7070 promptInit = mkOption {
7171 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
7573 '';
7674 description = ''
7775 Shell script code used to initialise the zsh prompt.
@@ -213,6 +211,15 @@ in
213211
214212 ${cfg.promptInit}
215213
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+
216223 # Read system-wide modifications.
217224 if test -f /etc/zshrc.local; then
218225 . /etc/zshrc.local