From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23467 invoked by alias); 7 Dec 2011 05:03:22 -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: 16606 Received: (qmail 21064 invoked from network); 7 Dec 2011 05:03:11 -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=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1RirHJyIZG71f7xphjWwgQjpWp8CmTinCKYniUn+Nrc=; b=ZdufjTo+6Ht2bCOtX9A6h48ysxU2FsXgCeVjeoOrCRFHfXsWvBfOAluMfzspa0U/O6 ng19JBEpbFFOgznXDoQ0h+MHGMpwozxMhiOOkXXfH/9cdzj1iIOSr1VUjEJXXyQZAzgf xFoXJovIfDF3cy6GJiiHwC8TFdWQVecByMRZ4= MIME-Version: 1.0 In-Reply-To: References: <20111207044346.GA6356@primenet.com.au> Date: Wed, 7 Dec 2011 13:03:05 +0800 Message-ID: Subject: Re: Could you provide bash's \$ which like zsh %#? From: Daniel Lin To: Jos Backus Cc: Zsh Users Content-Type: multipart/alternative; boundary=0016e6d77cf89058cb04b3797795 --0016e6d77cf89058cb04b3797795 Content-Type: text/plain; charset=UTF-8 Sorry, I've tried, it display strange things. PS1='%# %(#,$,%%)' 2011/12/7 Jos Backus > > > 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 > --0016e6d77cf89058cb04b3797795--