From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12789 invoked by alias); 3 Dec 2014 00:17: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: 19477 Received: (qmail 14714 invoked from network); 3 Dec 2014 00:17:20 -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,RCVD_IN_DNSWL_LOW, T_HDRS_LCASE,T_MANY_HDRS_LCASE autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=AduIQRnG c=1 sm=1 tr=0 a=wF+YgKUkZNOBI+JmS0mQZQ==:117 a=wF+YgKUkZNOBI+JmS0mQZQ==:17 a=G8GL833Es-AA:10 a=IkcTkHD0fZMA:10 a=82_OVr8Nsr6rvavYNPIA:9 a=QEXdDO2ut3YA:10 Message-id: <547E568C.6070607@eastlink.ca> Date: Tue, 02 Dec 2014 16:17:16 -0800 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-version: 1.0 To: Zsh Users Subject: triviality with prompts Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit Reading in the scrolls, I find this: setopt prompt_subst ... which permits this: _red=$'%{\e[1;31m%}' _grn=$'%{\e[1;32m%}' _yel=$'%{\e[1;33m%}' _blu=$'%{\e[1;34m%}' _mag=$'%{\e[1;35m%}' PS3=$'\n $_red MAKE A SELECTION ... ' PS1=$'\n$_yel%l $_red%m $_grn%n $_blu%d $_mag%(3L.%L.)$ %{\e[0m%}' ... which sure makes things more readable. However I note that PS3 will permit that variable substitution even without " setopt prompt_subst ", whereas PS1 requires it. Is that an anomaly or necessary? Could that setopt be on by default? Interesting that the variable expands even tho inside single quotes, not that I'm complaining.