all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: William Xu <william.xwl@gmail.com>
Cc: 54270@debbugs.gnu.org
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	[thread overview]
Message-ID: <87pmmzi6bm.fsf@gmx.de> (raw)
In-Reply-To: <87bkyjcs19.fsf@gmail.com> (William Xu's message of "Sun, 06 Mar 2022 11:08:18 +0100")

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	other threads:[~2022-03-06 13:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-06 10:08 bug#54270: 29.0.50; tramp doesn't work for zsh with trailing zle_bracketed_paste "2004h" William Xu
2022-03-06 13:00 ` Michael Albinus [this message]
2022-03-06 18:41   ` William Xu
2022-03-06 19:11     ` Michael Albinus
2022-03-06 20:13       ` William Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmmzi6bm.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=54270@debbugs.gnu.org \
    --cc=william.xwl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.