GNU bug report logs - #54270
29.0.50; tramp doesn't work for zsh with trailing zle_bracketed_paste "2004h"

Previous Next

Package: emacs;

Reported by: William Xu <william.xwl <at> gmail.com>

Date: Sun, 6 Mar 2022 10:09:01 UTC

Severity: normal

Tags: moreinfo, notabug

Found in version 29.0.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 54270 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: William Xu <william.xwl <at> gmail.com>
Cc: 54270 <at> debbugs.gnu.org
Subject: Re: 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
William Xu <william.xwl <at> 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.




This bug report was last modified 3 years and 75 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.