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

Re: USERNAME bug zsh-2.6-beta9



> "%n" should show the username of the uid running the shell in my opinion as
> that's what current privileges are in effect.  I guess this qualifies as a
> minor change from the way it's documented, and it was just "wrong" for so
> long I got used to it showing name of current uid.  Which beta release did
> that actually get "fixed"...about b7?

I think it only came in in beta9. It happend when init.c started using
getlogin(). It used that well before beta9, but an other bug prevented it
working.

I think your patch does the right thing.

Someone else said that su should not change the environment. In fact USERNAME
is usually not in the environment, and it is reinitialized each time a new zsh
process is invoked.

Bye,
   Zoltan



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