bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#54270: 29.0.50; tramp doesn't work for zsh with trailing zle_bracket


From: Michael Albinus
Subject: bug#54270: 29.0.50; tramp doesn't work for zsh with trailing zle_bracketed_paste "2004h"
Date: Sun, 06 Mar 2022 14:00:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

William Xu <william.xwl@gmail.com> writes:

Hi William,

> After some debugging, it turns out that zsh is adding some special
> zle_bracketed_paste at the end of the prompt: "~ % [?2004h", which
> makes the regexp matching fail. I have to make below change to fix it.

Indeed. The Tramp manual discusses the issue, and recommends to set on
the remote ~/.zshrc:

--8<---------------cut here---------------start------------->8---
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
--8<---------------cut here---------------end--------------->8---

> However, considering zsh has become the default shell in some OSes, like
> macOS, would it be possible to resolve this at tramp? Using changes like
> below? Or make regexp "\\'" be part of user configurable option, like
> tramp-shell-prompt-pattern?

I don't want to change this, due to possible damages for other
configurations. However, the Tramp manual recommends to tell Tramp, that
the remote shell is zsh, see (info "(tramp) Remote shell setup")
Tramp will behave correctly then.

Best regards, Michael.





reply via email to

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