zsh-workers
 help / color / mirror / code / Atom feed
* zsh 3.1.5 su problem
@ 1999-06-08  4:58 SADA Kenji
  1999-06-11 11:42 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: SADA Kenji @ 1999-06-08  4:58 UTC (permalink / raw)
  To: zsh-workers; +Cc: sada

Hello.

I heared that zsh-3.1.5 failures su function because
it emulates `sh' by first letter `s' of `su'.

How about a patch below.

Thanks !

*** options.c.orig      Mon Jun  7 11:03:16 1999
--- options.c   Mon Jun  7 11:32:17 1999
***************
*** 432,448 ****
  void
  emulate(const char *zsh_name, int fully)
  {
!     char ch = *zsh_name;

!     if (ch == 'r')
!       ch = zsh_name[1];

      /* Work out the new emulation mode */
!     if (ch == 'c')
        emulation = EMULATE_CSH;
!     else if (ch == 'k')
        emulation = EMULATE_KSH;
!     else if (ch == 's' || ch == 'b')
        emulation = EMULATE_SH;
      else
        emulation = EMULATE_ZSH;
--- 432,448 ----
  void
  emulate(const char *zsh_name, int fully)
  {
!     char *name = zsh_name;

!     if (*name == 'r')
!       name++;

      /* Work out the new emulation mode */
!     if (!strcmp (name, "csh"))
        emulation = EMULATE_CSH;
!     else if (!strcmp (name, "ksh"))
        emulation = EMULATE_KSH;
!     else if (!strcmp (name, "sh") || !strcmp (name, "bash"))
        emulation = EMULATE_SH;
      else
        emulation = EMULATE_ZSH;


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh 3.1.5 su problem
  1999-06-08  4:58 zsh 3.1.5 su problem SADA Kenji
@ 1999-06-11 11:42 ` Peter Stephenson
  1999-06-11 14:53   ` Geoff Wing
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1999-06-11 11:42 UTC (permalink / raw)
  To: SADA Kenji; +Cc: zsh-workers

SADA Kenji wrote:
> Hello.
> 
> I heared that zsh-3.1.5 failures su function because
> it emulates `sh' by first letter `s' of `su'.
 
This has now been fixed by handling su specially at startup, so that the
shell's name is changed to that given by $SHELL.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: zsh 3.1.5 su problem
  1999-06-11 11:42 ` Peter Stephenson
@ 1999-06-11 14:53   ` Geoff Wing
  0 siblings, 0 replies; 4+ messages in thread
From: Geoff Wing @ 1999-06-11 14:53 UTC (permalink / raw)
  To: zsh-workers

Peter Stephenson <pws@ibmth.df.unipi.it> typed:
:SADA Kenji wrote:
:> I heared that zsh-3.1.5 failures su function because
:> it emulates `sh' by first letter `s' of `su'.
:This has now been fixed by handling su specially at startup, so that the
:shell's name is changed to that given by $SHELL.

Yes, but I think you use the word ``fixed'' loosely.

Regards,
-- 
Geoff Wing   <gcw@pobox.com>            Mobile : (Australia) 0413 431 874
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* zsh 3.1.5 su problem
@ 1999-06-10 15:01 SADA Kenji
  0 siblings, 0 replies; 4+ messages in thread
From: SADA Kenji @ 1999-06-10 15:01 UTC (permalink / raw)
  To: zsh-workers; +Cc: sada

Hello.

I heared that zsh-3.1.5 failures su function because
it emulates `sh' by first letter `s' of `su'.

How about a patch below.

Thanks !

*** options.c.orig      Mon Jun  7 11:03:16 1999
--- options.c   Mon Jun  7 11:32:17 1999
***************
*** 432,448 ****
  void
  emulate(const char *zsh_name, int fully)
  {
!     char ch = *zsh_name;

!     if (ch == 'r')
!       ch = zsh_name[1];

      /* Work out the new emulation mode */
!     if (ch == 'c')
        emulation = EMULATE_CSH;
!     else if (ch == 'k')
        emulation = EMULATE_KSH;
!     else if (ch == 's' || ch == 'b')
        emulation = EMULATE_SH;
      else
        emulation = EMULATE_ZSH;
--- 432,448 ----
  void
  emulate(const char *zsh_name, int fully)
  {
!     char *name = zsh_name;

!     if (*name == 'r')
!       name++;

      /* Work out the new emulation mode */
!     if (!strcmp (name, "csh"))
        emulation = EMULATE_CSH;
!     else if (!strcmp (name, "ksh"))
        emulation = EMULATE_KSH;
!     else if (!strcmp (name, "sh") || !strcmp (name, "bash"))
        emulation = EMULATE_SH;
      else
        emulation = EMULATE_ZSH;


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1999-06-11 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-08  4:58 zsh 3.1.5 su problem SADA Kenji
1999-06-11 11:42 ` Peter Stephenson
1999-06-11 14:53   ` Geoff Wing
1999-06-10 15:01 SADA Kenji

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).