zsh-users
 help / color / mirror / code / Atom feed
* Curiosity about EMULATE_SH and su
@ 1998-11-07  7:31 Josh Howard
  0 siblings, 0 replies; only message in thread
From: Josh Howard @ 1998-11-07  7:31 UTC (permalink / raw)
  To: zsh-users

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@zeppelin.net) -- http://www.zeppelin.net
"Reality is that which, when you stop believing in it, doesn't go away." 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-11-07  7:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-07  7:31 Curiosity about EMULATE_SH and su Josh Howard

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).