Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: promptinit



Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) 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;



Messages sorted by: Reverse Date, Date, Thread, Author