From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25099 invoked from network); 9 May 2005 17:25:15 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 May 2005 17:25:15 -0000 Received: (qmail 16265 invoked from network); 9 May 2005 17:25:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 May 2005 17:25:10 -0000 Received: (qmail 22553 invoked by alias); 9 May 2005 17:25:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21240 Received: (qmail 22535 invoked from network); 9 May 2005 17:25:06 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 May 2005 17:25:06 -0000 Received: (qmail 15969 invoked from network); 9 May 2005 17:25:06 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 9 May 2005 17:24:56 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IG8002S6GDH7UT7@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Mon, 09 May 2005 12:24:55 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j49HOpb2011222 for ; Mon, 09 May 2005 10:24:51 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j49HOpuj011221 for zsh-workers@sunsite.dk; Mon, 09 May 2005 10:24:51 -0700 Date: Mon, 09 May 2005 17:24:50 +0000 From: Bart Schaefer Subject: 8-bit parameter names? To: zsh-workers@sunsite.dk Message-id: <1050509172451.ZM11220@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Is it intentional that 8-bit characters can be used in parameter name identifiers, or is it a bug? I was just looking at prompt_elite2_setup again, which has this comment: Recommended fonts for this theme: nexus or vga or similar. If you don't have any of these, the 8-bit characters will probably look stupid. In fact, the 8-bit characters don't look like anything at all, because they're never displayed. They're never displayed because the assingment to PS1 is full of stuff like "$punctuation_colorU$textA..." where I've replaced an 8-bit U-with-acute and A-with-umlaut with ascii U and A for mailing list sanity. The parameter code is treating e.g. U-with-acute as a valid part of the identifier and finding no such parameter, so large parts of the elite2 prompt have simply been disappearing. (If set_prompt didn't execute "emulate -L zsh" (which turns off the "nounset" option) this would have been much easier to catch.) The prompt_elite2_setup function, meanwhile, was apparently meant all along to be as follows; not sent as a patch because again I'm avoiding sending 8-bit characters to the mailing list. prompt_elite2_setup () { local text_col=${1:-'cyan'} local parens_col=${2:-$text_col} for code in 332 304 300; do local varname=char_$code : ${(P)varname=$(echo -n "\\0$code")} done local text="%{$fg_no_bold[$text_col]%}" local parens="%{$fg_bold[$parens_col]%}" local punct="%{$fg_bold[grey]%}" local reset="%{$reset_color%}" local lpar="$parens($text" local rpar="$parens)$text" PS1="$punct$char_332$text$char_304$lpar%n$punct@$text%m$rpar$char_304$lpar%!$punct/$text%y$rpar$char_304$lpar%D{%I:%M%P}$punct:$text%D{%m/%d/%y}$rpar$char_304$punct-$reset$prompt_newline$punct$char_300$text$char_304$lpar%#$punct:$text%~$rpar$char_304$punct-$reset " PS2="$parens$char_304$text$char_304$punct-$reset " precmd () { setopt promptsubst } preexec () { } }