Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What makes %# tick?
- X-seq: zsh-users 11141
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: What makes %# tick?
- Date: Tue, 23 Jan 2007 07:12:39 -0800
- In-reply-to: <86lkjurkpa.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <86lkjurkpa.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
On Jan 23, 12:28pm, Tim Haynes wrote:
}
} Just noticed an interesting anomaly after starting to use the realtime
} module[0] on linux
The %# prompt changes from % to # any time the effective user ID is zero,
as reported by geteuid(). If your OS supports POSIX capability sets,
it also changes to # when cap_get_flag() indicates that any capability
set returned by cap_get_proc() has the CAP_EFFECTIVE property. This is
probably what's happening in your case. It's also quite possible that
the code in zsh that is testing cap_get_flag() is doing it wrong, but
it's been around a long time and no one has griped yet.
The test %(#.#.%%) on the other hand only checks geteuid() for zero, so
as a workaround you can replace %# with %(#.#.%%). (For reasons I've
forgotten, %# is really the same as %(!.#.%%).)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author