Merge pull request #67225 from matthewbauer/tramp-zshrc-fix
nixos/zsh: Fix tramp support
This commit is contained in:
commit
1329703616
@ -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…
x
Reference in New Issue
Block a user