emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tramp over su, with odd zsh prompt


From: Michael Albinus
Subject: Re: Tramp over su, with odd zsh prompt
Date: Mon, 29 May 2006 22:06:33 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> I recently tried to use Tramp to access a file via `su' and bumped into the
> following problem: the prompt (resulting from a very plain default setting
> PS1="%m%# ") looks like
>
>     %<78 SPC>^M^Malfajor% 
>
> where alfajor is the machine name (an argentine pastry).
>
> So it seems that although Tramp sets TERM=dump, the `zsh' executable
> (version 4.3.2, from Debian testing) uses funny carriaqe-return trickery and
> for apparently no good reason.
>
> Has anybody seen this before?  Should I just set
> tramp-shell-prompt-pattern accordingly?  Have you heard of such
> behavior already (and maybe some way to get zsh to behave a bit better)?

When zsh is in interactive mode, it uses its internal zsh line editor
(zle). This provides left and right prompts; therefore the
spaces. Disabling zle for the Tramp case is sufficient.

The following lines in .zshrc work for me:

# Let Tramp come in
[ $TERM = "dumb" ] && unsetopt zle

>         Stefan

Best regards, Michael.

PS: "for apparently no good reason" depends. Play with promptinit /
prompt themes, you'll see lot of gimmicks.

PPS: I'll give it a short note in the Tramp manual.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]