From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17751 invoked from network); 4 Jun 2003 09:41:42 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Jun 2003 09:41:42 -0000 Received: (qmail 6490 invoked by alias); 4 Jun 2003 09:41:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18603 Received: (qmail 6481 invoked from network); 4 Jun 2003 09:41:36 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 4 Jun 2003 09:41:36 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 4 Jun 2003 9:41:35 -0000 Received: (qmail 28781 invoked from network); 4 Jun 2003 09:41:28 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-23.tower-4.messagelabs.com with SMTP; 4 Jun 2003 09:41:28 -0000 Received: from gmcs3.local ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id h549fRQ1032396; Wed, 4 Jun 2003 10:41:27 +0100 Received: from gmcs3.local (localhost [127.0.0.1]) by gmcs3.local (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h549ftl03276; Wed, 4 Jun 2003 11:41:56 +0200 cc: zsh-workers@sunsite.dk X-VirusChecked: Checked In-reply-to: <5.2.1.1.0.20030531101708.025fcc78@valenzud.inbox.email.arizona.edu> From: Oliver Kiddle References: <5.2.1.1.0.20030531101708.025fcc78@valenzud.inbox.email.arizona.edu> To: Dirus Subject: Re: prompt themes Date: Wed, 04 Jun 2003 11:41:55 +0200 Message-ID: <3274.1054719715@gmcs3.local> Dirus wrote: > I had been playing around with prompt themes a bit and I noticed a couple > of things. > > prompt_X_preview doesn't print the first or last blank line. This means > the person writing the prompt theme would have to print the blank lines > between sample settings without printing the first or last. Whoever is I'm not quite sure which blank lines you're talking about. > writing the function also has to check "if (( ! $#* ));" to see if the user > passed in any parameters himself. Each prompt_X_preview function will have > a lot of duplicate code. I agree. It would probably be sensible if the theme system automatically checked that and ran prompt_preview_theme with the parameters. It should probably also do a preview even if there isn't a prompt_X_preview function - there isn't for most. > In the interest of consolidating all of the code and logic to one place and > also to make it easier for a person to set up a preview for their theme, > I'd like to create a patch for the prompt theming (and it's themes) that > that causes prompt_X_preview to return a list of settings in $reply (or > $REPLY). (Is the lowercase preferred for an array of values?) Yes, $reply for array values. > Ideally prompt_X_preview would look like this: > prompt_X_preview() { > reply=' singleparameter "param1 param2" "param1 param2" ' > } Or, since it is an array, reply=( singleparameter "param1 param2" "param1 param2" ) > Also prompt_X_help could also be changed to set $reply for consistency sake. I'm less convinced by that idea. There's not really any code that can be factored out and it wouldn't make the functions any simpler. > Anyone interested in seeing this? Is it best to just send the diffs to the > mailing list? There would be a lot of them, one for each prompt theme and > one for promptinit. Just send a diff. There's probably quite a few aspects of the prompt theming that could be improved. Making colour schemes independent of specific fonts would be one example. Perhaps sorting through the distributed themes too: it isn't ideal that many don't work right unless your use some peculiar font and terminal emulator. Oliver PS. If anyone wants it, I have an MH prompt theme which sticks the current folder and message number in the prompt.