about summary refs log tree commit diff
path: root/Misc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-18 15:47:16 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-18 15:47:16 +0000
commitc996001c28bad6ec35f27588c5199e00dcd97b8a (patch)
treeaf46fbd7af9bd88a81096cff85679fc1f753a0e0 /Misc
parent17a3040fb730b71414f97d33474e995a3f80eb14 (diff)
downloadzsh-c996001c28bad6ec35f27588c5199e00dcd97b8a.tar.gz
zsh-c996001c28bad6ec35f27588c5199e00dcd97b8a.tar.xz
zsh-c996001c28bad6ec35f27588c5199e00dcd97b8a.zip
zsh-workers/8669
Diffstat (limited to 'Misc')
-rw-r--r--Misc/bash2zshprompt13
1 files changed, 7 insertions, 6 deletions
diff --git a/Misc/bash2zshprompt b/Misc/bash2zshprompt
index e6a668e76..7fc11434e 100644
--- a/Misc/bash2zshprompt
+++ b/Misc/bash2zshprompt
@@ -10,7 +10,7 @@ use strict;
 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 @@ sub color {
               ($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 {