On Wed, 17 Jan 2001, Bruce Ingalls wrote:
> Kai Großjohann wrote:
>
>> The only reason that tramp-remote-sh exists is that "exec /bin/sh"
>> is the very first command that's issued by Tramp, so that it at
>> least knows how to set the prompt and stuff like this.
>
> Isn't $SHELL set at remote login?
> You can usually look at /etc/shells to see what is available, if you
> don't like what you have.
How am I supposed to check the value of $SHELL? Also, csh-like shells
might have $shell rather than $SHELL...
# Bourne shell
if [ "$SHELL" = "/bin/sh" ] ; then
echo bourne, bourne
fi
# Csh
if ( "$SHELL" == "/bin/csh" ) then
echo c, c
endif
As you can see, even the `if' command is quite different.
> Does it make sense to do a which()-like command, and use that
> version of perl? I'm not sure which perl5 features that tramp
> exploits.
I was afraid that this which-like command might be known by various
names on various systems, and the output might vary.
Though it appears that `which perl' might produce directly usable
output. Hm.
Well. On my Solaris system, I get:
/----
| grossjoh@bonny> which perl
| dot cshrc speaking
| Warning: ridiculously long PATH truncated
| /app/unido-i06/sun4_56/lang/perl/5.6.0/bin/perl
\----
This is running under bash.
> Finally, I'm not sure if Mac OS-X will have any shell available,
> other than /bin/zsh.
Does that mean that /bin/sh does not exist there, not even as a
symlink to /bin/zsh? Omygod.
I'm hoping that zsh is sufficiently Bourne-ish.
> The traditional solution is to have a sh and a csh solution, and
> decide which to use.
Are you suggesting that I should change Tramp such that it knows two
versions of each shell command? Nonono, down that path lies madness.
At least that's my VHO. You might wish to have a look through Tramp
and see if all these commands can be replicated in csh-like shells.
kai
--
Be indiscrete. Do it continuously.