Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Could you provide bash's \$ which like zsh %#?
On Tue, Dec 6, 2011 at 8:43 PM, Geoff Wing <gcw@xxxxxxx> wrote:
> Please CC replies to Daniel.
>
> ----- Forwarded message from Daniel Lin <dlin.tw@xxxxxxxxx> -----
>
> I'm trying to move from bash to zsh.
> I found a problem. My 'expect' scripts require a '$' sign to let me know
> its done.
>
> In zsh the %# will display % when user's effective id is not 0.
> But, I require another similar function which display '$' instead of '%'.
>
> Could you consider to add this function to help bash users' life easier?
>
> I already change my PS1="\\$"
> But its function is not equal to %#.
>
> ----- End forwarded message -----
>
How about using `%(,,)'?
Example prompt string:
%m:%~%# %(#,$,%%)
--
Jos Backus
jos at catnook.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author