From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1261 invoked by alias); 7 Dec 2011 04:56:23 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16605 Received: (qmail 29992 invoked from network); 7 Dec 2011 04:56:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at catnook.com does not designate permitted sender hosts) MIME-Version: 1.0 In-Reply-To: <20111207044346.GA6356@primenet.com.au> References: <20111207044346.GA6356@primenet.com.au> Date: Tue, 6 Dec 2011 20:56:17 -0800 Message-ID: Subject: Re: Could you provide bash's \$ which like zsh %#? From: Jos Backus To: Zsh Users Cc: dlin.tw@gmail.com Content-Type: multipart/alternative; boundary=20cf307d046a3d735704b3795f63 --20cf307d046a3d735704b3795f63 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Dec 6, 2011 at 8:43 PM, Geoff Wing wrote: > Please CC replies to Daniel. > > ----- Forwarded message from Daniel Lin ----- > > 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 --20cf307d046a3d735704b3795f63--