zsh-users
 help / color / mirror / code / Atom feed
From: Jos Backus <jos@catnook.com>
To: Zsh Users <zsh-users@zsh.org>
Cc: dlin.tw@gmail.com
Subject: Re: Could you provide bash's \$ which like zsh %#?
Date: Tue, 6 Dec 2011 20:56:17 -0800	[thread overview]
Message-ID: <CAETOPp3aTwGL7AZ_FkU7sjFWugSNzOguLXofO2ggQFfz30hhvw@mail.gmail.com> (raw)
In-Reply-To: <20111207044346.GA6356@primenet.com.au>

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

On Tue, Dec 6, 2011 at 8:43 PM, Geoff Wing <gcw@zsh.org> wrote:

> Please CC replies to Daniel.
>
> ----- Forwarded message from Daniel Lin <dlin.tw@gmail.com> -----
>
> 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

  reply	other threads:[~2011-12-07  4:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  4:43 Fwd: " Geoff Wing
2011-12-07  4:56 ` Jos Backus [this message]
2011-12-07  5:03   ` Daniel Lin
2011-12-07  5:09     ` Jos Backus
     [not found]       ` <CAPg-njwWN=a6XDv047MwXVSYzuX3Ew5u5tprTnRqFeTpnUopcQ@mail.gmail.com>
     [not found]         ` <CAETOPp3+tdbAMmf9T49Hqc1gfZvYqzXgiLRiAZ=aSCkwWsHKKw@mail.gmail.com>
2011-12-07  7:04           ` Daniel Lin
2011-12-07  8:16             ` Bart Schaefer
2011-12-07 10:10               ` Daniel Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAETOPp3aTwGL7AZ_FkU7sjFWugSNzOguLXofO2ggQFfz30hhvw@mail.gmail.com \
    --to=jos@catnook.com \
    --cc=dlin.tw@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).