Francis Litterio <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (Kai Gro�johann) writes:
>
>> Francis Litterio <[EMAIL PROTECTED]> 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)


_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.freesoftware.fsf.org/mailman/listinfo/tramp-devel

Reply via email to