From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23951 invoked from network); 15 Oct 1999 12:47:43 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Oct 1999 12:47:43 -0000 Received: (qmail 27389 invoked by alias); 15 Oct 1999 12:47:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8278 Received: (qmail 27369 invoked from network); 15 Oct 1999 12:47:26 -0000 Date: Fri, 15 Oct 1999 13:47:14 +0100 From: Adam Spiers To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: promptinit Message-ID: <19991015134714.A15938@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh-workers@sunsite.auc.dk References: <199910141300.PAA14858@beta.informatik.hu-berlin.de> <991015084320.ZM22872@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <991015084320.ZM22872@candle.brasslantern.com> X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.12 i686 Bart Schaefer (schaefer@candle.brasslantern.com) wrote: > On Oct 14, 3:00pm, Sven Wischnowsky wrote: > } Subject: PATCH: promptinit > } > } ... or did I miss a patch? > > Here are some other misc. fixes ... Thanks Bart, and sorry I couldn't get round to publishing fixes myself; I've had a lot on recently. > I don't know whether some of these > might be better handled by changing the perl prompt converter script ... No harm in adding the promptsubst setting I guess ... > Also, I really don't like having my precmd stomped on, but I haven't yet > gotten around to fixing that. Yep ... bash2zshprompt is fundamentally flawed in that it tries to semi-parse shell-script in a very simple way; hence any number of things could probably go wrong. However, it's an adequate, useful starting point when converting prompts from bashprompt, as long as a human checks the results and edits if necessary afterwards. As I think I mentioned, I'll be cleaning up all the included prompt themes when I get the chance. Index: Misc/bash2zshprompt =================================================================== RCS file: /usr/local/cvsroot/zsh/Misc/bash2zshprompt,v retrieving revision 1.2 diff -u -r1.2 bash2zshprompt --- Misc/bash2zshprompt 1999/10/06 18:27:12 1.2 +++ Misc/bash2zshprompt 1999/10/15 12:40:57 @@ -25,7 +25,7 @@ # UGH elsif (! $seen_fn_end && $seen_fn) { s/^\s*/ /; - s/^\s*}\s*$/\n precmd () { }\n preexec () { }\n}\n/ and $seen_fn_end++; + s/^\s*}\s*$/\n precmd () { setopt promptsubst }\n preexec () { }\n}\n/ and $seen_fn_end++; } s/\\\[/%{/g;