Kai Großjohann wrote:
> How am I supposed to check the value of $SHELL? Also, csh-like shells
> might have $shell rather than $SHELL...
>
> As you can see, even the `if' command is quite different.
Uh yeah. dead end.
>> 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
> \----
I use which.el, myself, which is fast. However, I recall that there
is some which()-like emacs function.
>> 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.
Don't know of symlink; the release version is not out yet.
>
> I'm hoping that zsh is sufficiently Bourne-ish.
zsh is not posix/xpg4 compliant, but does a good job of running
every ksh/bash command you throw at it.
>> 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.
You are probably right; most modern unixes should have at least
ksh-88 (original old Korn Shell) installed. Except Mac OS-X.
However, zsh is pretty much ksh-88 compliant.
You could probably do
/bin/ksh || /bin/zsh
and hope that these are the correct directories.