Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Curiosity about EMULATE_SH and su



I'm a bit curious as to why in options.c, there's only a check for the 
first letter when deciding what sort of emulation we're going  to do.
Wouldn't it make more sense to revert back to the old form and check 
for the entire name?

The current form being:
    else if (ch == 's' || ch == 'b')
        emulation = EMULATE_SH;

The old form being:
    else if(!strcmp(zsh_name, "sh"))
        emulation = EMULATE_SH;

Currently, when I "su" on my machine, I get a ZSH_NAME of "su" and my
shell drops in to sh compatibility mode, this is obviously not
happening with every OS; FreeBSD's su is making some assumptions, but
what would be the harm in the old method? Just a little curious. I
have no problem patching my version of zsh, and even contributing a
patch to the FreeBSD folks, but I figured you might like to hear about 
it.

-- 
Josh Howard (jrh@xxxxxxxxxxxx) -- http://www.zeppelin.net
"Reality is that which, when you stop believing in it, doesn't go away." 



Messages sorted by: Reverse Date, Date, Thread, Author