diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-08-21 20:46:20 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-08-21 21:24:45 -0400 |
commit | ac773d16076a17c895a39d493d2c91e8f2df3dc9 (patch) | |
tree | 19d171b4897f135b95bb21dafd4a8e94b23bee36 /nixos/modules/programs | |
parent | f96fdd88c5da3d6a8c1ce4f9bdf4f8b1d9187534 (diff) | |
download | nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.tar nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.tar.gz nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.tar.bz2 nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.tar.lz nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.tar.xz nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.tar.zst nixlib-ac773d16076a17c895a39d493d2c91e8f2df3dc9.zip |
nixos/zsh: Fix tramp support
For a long time, TRAMP has not worked with ZSH NixOS servers. I thought I fixed this in 0740f57e63af61694d14796286cb9204, but now realize that was only half the problem. For TRAMP to start working again ‘unsetopt zle’ was needed, otherwise the connection would hang. In addition, I have a few more settings added that can apparenty interfere with these settings.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/zsh/zsh.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 3cbfd8fa4d32..27f4166e1005 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 && setopt prompt_sp - 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 |