Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: USERNAME bug zsh-2.6-beta9
- X-seq: zsh-workers 129
- From: pckizer@xxxxxxxx (Philip Kizer)
- To: becker@xxxxxxxxx
- Subject: Re: USERNAME bug zsh-2.6-beta9
- Date: Fri, 30 Jun 1995 10:20:47 -0500
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: Your message of "Fri, 30 Jun 1995 11:10:50 EDT." <9506301510.AA15040@phobos>
- Reply-to: pckizer@xxxxxxxx
- Sender: pckizer@xxxxxxxxxxxxxx
becker@xxxxxxxxxxxxxxxx (Paul H. Becker) wrote:
>One (tiny) problem I have found with zsh-2.6-beta9 (as well as
>zsh-2.6-beta9-hzoli9) is that when I "su" to a new user, $USERNAME stays
>the same as the person I initially logged in as ($LOGNAME). Previous
>version of zsh (zsh-2.6-beta8) correctly change $USERNAME when I "su".
>As a result, prompt="%n>" will not display the correct username.
>
>(btw: zsh is great, I really appreciate all the efforts...)
Ah...I definitaly agree with you, this got me to finally track down the
change, this works for me:
*** init.c.bak Fri Jun 30 10:18:35 1995
--- init.c Fri Jun 30 10:18:49 1995
***************
*** 513,519 ****
else
logname = ztrdup("");
}
! username = ztrdup(logname);
/* Try a cheap test to see if we can *
* initialize $PWD from $HOME */
--- 513,519 ----
else
logname = ztrdup("");
}
! username = ztrdup(pswd->pw_name);
/* Try a cheap test to see if we can *
* initialize $PWD from $HOME */
Much better...thanks for complaining :)
-philip
____________________________________________________________ Philip Kizer ___
Texas A&M CIS Operating Systems Group, Unix ( 409.862.4120 ) pckizer@xxxxxxxx
"Relying on the government to protect your privacy is like asking a peeping
tom to install your window blinds." -John Perry Barlow, EFF co-founder
Messages sorted by:
Reverse Date,
Date,
Thread,
Author