mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
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.
This commit is contained in:
parent
f96fdd88c5
commit
ac773d1607
@ -69,9 +69,7 @@ in
|
||||
|
||||
promptInit = mkOption {
|
||||
default = ''
|
||||
if [ "$TERM" != dumb ]; then
|
||||
autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp
|
||||
fi
|
||||
'';
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user