Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: prompt theme system improvements
- X-seq: zsh-workers 8669
- From: Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: PATCH: prompt theme system improvements
- Date: Thu, 18 Nov 1999 15:43:22 +0000
- In-reply-to: <19991118145330.A22718@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh workers mailing list <zsh-workers@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19991118145330.A22718@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Adam Spiers, on thelonious (adam@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> OK, finally here's a patch to the prompt system which vastly improves
> it.
I forgot Misc/bash2zshprompt. Doh.
Index: Misc/bash2zshprompt
===================================================================
RCS file: /projects/zsh/zsh/Misc/bash2zshprompt,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 bash2zshprompt
--- Misc/bash2zshprompt 1999/10/15 13:07:14 1.1.1.3
+++ Misc/bash2zshprompt 1999/11/18 15:42:04
@@ -10,7 +10,7 @@
my @colours = qw/grey red green yellow blue magenta cyan white/;
my @codes = ();
-my %bold;
+my %boldp;
my $out = '';
print "# Converted to zsh prompt theme by bash2zshprompt, written by <adam\@spiers.net>\n";
@@ -80,21 +80,22 @@
($p[1] eq '4') ? 'bg' :
'???');
- $bold{$fgbg} ||= '';
+ $boldp{$fgbg} ||= '';
if ($p[0] =~ /^0?0$/) {
- $bold{$fgbg} = '';
+ $boldp{$fgbg} = '';
return '$reset_color';
}
if ($p[0] =~ /^0?1$/) {
- $bold{$fgbg} = 'bold_';
+ $boldp{$fgbg} = 'bold_';
return '$bold_color';
}
return '$' .
- "${fgbg}_$bold{$fgbg}" .
- $colours[$p[2]];
+ "${fgbg}$boldp{$fgbg}\[" .
+ $colours[$p[2]] .
+ ']';
}
sub split_codes {
Messages sorted by:
Reverse Date,
Date,
Thread,
Author