From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23601 invoked by alias); 3 Dec 2014 03:02:00 -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: 19479 Received: (qmail 7126 invoked from network); 3 Dec 2014 03:02:00 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=MJ3XQ3dg c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=A92cGCtB03wA:10 a=op_vkBo2lY6mpTDmUXgA:9 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <141202190200.ZM31930@torch.brasslantern.com> Date: Tue, 02 Dec 2014 19:02:00 -0800 In-reply-to: <547E568C.6070607@eastlink.ca> Comments: In reply to Ray Andrews "triviality with prompts" (Dec 2, 4:17pm) References: <547E568C.6070607@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: triviality with prompts MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 2, 4:17pm, Ray Andrews wrote: } } PS3 will permit that variable substitution even without } " setopt prompt_subst ", whereas PS1 requires it. I think you've deluded yourself somehow. PS3 behaves just like all the other prompts. } Interesting that the variable expands even tho inside single } quotes, not that I'm complaining. Once again you're confused about how quoting works. The variable isn't inside single quotes at the time the prompt is expanded. In fact, in your example $'...' is NOT the same as single quotes. If you'd read a little further through the scrolls, you'd have seen you need neither _red=$'%{\e[1;31m%}' nor prompt_subst: PS3=$'\n %F{red} MAKE A SELECTION ... %f' PS1=$'\n%F{yellow}%l %F{red}%m %F{green}%n %F{blue}%d %F{magenta}%(3L.%L.)$ %f'