unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* help setting TRAMP prompt pattern
@ 2024-02-08 13:14 Luca Ferrari
  2024-02-08 15:01 ` Michael Albinus
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Ferrari @ 2024-02-08 13:14 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,
again, I'm fighting against TRAMP and a remote host having zsh. If, on
the same machine, TRAMP connects to a Bash shell everything works as
expected, however if connecting to a zsh prompt it hangs.

Bash prompt:
[luca@rachel ~]$ echo $PS1
[\u@\h \W]\$

Zsh prompt
[luca@rachel]~% echo $PROMPT
[%n@%m]%~%#

Tramp tramp-shell-prompt-pattern
"\\(?:^\\|
\\)[^]#$%>
]*#?[]#$%>] *\\( \\[[[:digit:];]*[[:alpha:]] *\\)*"

Emacs version 28.2, Tramp version 2.5.3.28.2.

How can I get the prompt sequence to adjust the pattern?

Thanks,
Luca




E



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help setting TRAMP prompt pattern
  2024-02-08 13:14 help setting TRAMP prompt pattern Luca Ferrari
@ 2024-02-08 15:01 ` Michael Albinus
  2024-02-08 16:52   ` Luca Ferrari
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2024-02-08 15:01 UTC (permalink / raw)
  To: Luca Ferrari; +Cc: help-gnu-emacs

Luca Ferrari <fluca1978@gmail.com> writes:

> Hi all,

Hi Luca,

> again, I'm fighting against TRAMP and a remote host having zsh. If, on
> the same machine, TRAMP connects to a Bash shell everything works as
> expected, however if connecting to a zsh prompt it hangs.
>
> How can I get the prompt sequence to adjust the pattern?

Read the Tramp manual (info "(tramp) Frequently Asked Questions")

--8<---------------cut here---------------start------------->8---
          When using zsh on remote hosts, disable zsh line editor
          because zsh uses left-hand side and right-hand side prompts in
          parallel.  Add the following line to ‘~/.zshrc’:

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

> Thanks,
> Luca

Best regards, Michael.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help setting TRAMP prompt pattern
  2024-02-08 15:01 ` Michael Albinus
@ 2024-02-08 16:52   ` Luca Ferrari
  0 siblings, 0 replies; 3+ messages in thread
From: Luca Ferrari @ 2024-02-08 16:52 UTC (permalink / raw)
  To: Michael Albinus; +Cc: help-gnu-emacs

On Thu, Feb 8, 2024 at 4:01 PM Michael Albinus <michael.albinus@gmx.de> wrote:
> --8<---------------cut here---------------start------------->8---
>           When using zsh on remote hosts, disable zsh line editor
>           because zsh uses left-hand side and right-hand side prompts in
>           parallel.  Add the following line to ‘~/.zshrc’:
>
>                [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
> --8<---------------cut here---------------end--------------->8---

Shame on me!
Thanks, it works.

Luca



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-08 16:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 13:14 help setting TRAMP prompt pattern Luca Ferrari
2024-02-08 15:01 ` Michael Albinus
2024-02-08 16:52   ` Luca Ferrari

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).