tramp-devel
[Top][All Lists]
Advanced

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

Re: Possible bug in lisp/tramp.el rev. 2.240


From: Kai Großjohann
Subject: Re: Possible bug in lisp/tramp.el rev. 2.240
Date: Tue, 08 Oct 2002 19:49:12 +0200
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Francis Litterio <address@hidden> writes:

> address@hidden (Kai Großjohann) writes:
>
>> Francis Litterio <address@hidden> writes:
>>
>>> Shouldn't it be waiting to see the specified shell prompt ('$ ') instead
>>> of the user-configured prompt specified by tramp-shell-prompt-pattern or
>>> shell-prompt-pattern?
>>
>> It should wait for both, in case the sh init files change the prompt
>> again.
>
> /bin/sh has two possible init files (/etc/profile and $HOME/.profile).
> When /bin/sh is invoked as a non-login shell (which is what happens in
> function tramp-find-shell), it does not source either one.  Therefore,
> the value of PS1 should not change from the inherited value ('$ ').
>
> The only shell that I know of that gets installed as /bin/sh is Bash.  I
> have verified that Bash behaves like the traditional Bourne shell when
> invoked as /bin/sh (i.e., it does _not_ source /etc/profile or
> $HOME/.profile, nor does it source any Bash-specific files, such as
> $HOME/.bash_profile or $HOME/.bashrc).  This is a good thing for TRAMP.

Ah.  This is good to know.  But people can change the shell to use
instead of /bin/sh.  And people do use this feature.  They do it
because they don't want Tramp to start a second shell just for tilde
expansion.

And "exec /bin/bash" does not behave so nicely and might clobber $PS1 :-(

>> Should I really be adding yet another variable or hard-coded regexp?
>
> I think you can do away with the match against shell-prompt-pattern and
> tramp-shell-prompt-pattern entirely.

I'm afraid not :-/

How about waiting a little bit to see if anybody else will observe
the same problem?  After all, I introduced tramp-shell-prompt-pattern
so that people have to configure the patterns less often.  (Before,
Tramp would match shell-prompt-pattern and the string "$ ".)

kai
-- 
~/.signature is: umop ap!sdn    (Frank Nobis)




reply via email to

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