mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +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
1 changed files with 10 additions and 3 deletions
|
@ -69,9 +69,7 @@ in
|
||||||
|
|
||||||
promptInit = mkOption {
|
promptInit = mkOption {
|
||||||
default = ''
|
default = ''
|
||||||
if [ "$TERM" != dumb ]; then
|
autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp
|
||||||
autoload -U promptinit && promptinit && prompt walters && setopt prompt_sp
|
|
||||||
fi
|
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Shell script code used to initialise the zsh prompt.
|
Shell script code used to initialise the zsh prompt.
|
||||||
|
@ -213,6 +211,15 @@ in
|
||||||
|
|
||||||
${cfg.promptInit}
|
${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.
|
# Read system-wide modifications.
|
||||||
if test -f /etc/zshrc.local; then
|
if test -f /etc/zshrc.local; then
|
||||||
. /etc/zshrc.local
|
. /etc/zshrc.local
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue