tramp-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix regexps for coloured shell prompts, and a typo.


From: Kai Großjohann
Subject: Re: [PATCH] Fix regexps for coloured shell prompts, and a typo.
Date: Fri, 19 Jul 2002 09:42:13 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu)

Steve Youngs <address@hidden> writes:

> Without this patch I was getting a void variable error

Thank you for fixing that one.

> and couldn't connect to any user/host that used colour control
> characters in the shell prompt.

I don't like that part of the change.  Why didn't you look why I
introduced \\' in the first place?  There was a reason for me to do
that.

/----
| 2002-05-22  Kai Großjohann  <address@hidden>
| 
|       * tramp.el (tramp-find-shell, tramp-open-connection-telnet) 
|       (tramp-open-connection-rsh, tramp-open-connection-su) 
|       (tramp-open-connection-multi, tramp-multi-connect-telnet) 
|       (tramp-multi-connect-rlogin) 
|       (tramp-open-connection-setup-interactive-shell): Shell prompt
|       must match at end of buffer.    
\----

Oh, now I see that there was no reason given.  Sorry about this.  So
here is the reason: a lot of people have a motd that contains things
like this:

/----
| Linux lucy 2.4.19-pre10-ls6 #1 Wed Jun 5 11:13:06 CEST 2002 i686 unknown
\----

A lot of people have a shell-prompt-pattern which says that something
followed by `#' (or `$' or `>' or some other characters) is a shell
prompt.  (This is in fact the default value on Emacs, I think.)

Now you can quickly see that Tramp will get confused: it recognizes
the above line as a shell prompt and starts sending commands to the
remote end.  But the real shell prompt comes later and is mistaken for
the reply to the first command sent.  Need I say more?  :-{

I think it does not really make sense to require people to change
their motd on all remote machines.  (They probably don't have
permission to do that anyway.)

Therefore I suggest to take a different approach: tell their shell
init files to abstain from ansi escapes in shell prompts when $TERM
is "dumb".  Tramp conveniently sets $TERM to "dumb" for this very
reason :-)  (They probably have permissions to frob their shell init
files.)

If that is not possible, they can still add the ansi escapes to
shell-prompt-pattern...

Opinions?

> BTW, what happened to the "tramp-checkins" list?  I'm not getting CVS
> commit notices anymore. :-(

I hope I have recreated the list.  I forgot to do that before.  I have
copied and pasted magic into CVSROOT/loginfo and CVSROOT/commitinfo
without a deeper understanding of what's going on.

kai
-- 
It does not work to power-cycle a machine without a deeper
understanding of what's going on.



reply via email to

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