lilalo
diff l3prompt @ 114:658b4ea105c1
PS1 bug fixed
author | igor |
---|---|
date | Sun Mar 09 02:38:56 2008 +0200 (2008-03-09) |
parents | da65f1cbaf3a |
children | 9bb58a1eee2b |
line diff
1.1 --- a/l3prompt Sat Mar 08 22:36:44 2008 +0200 1.2 +++ b/l3prompt Sun Mar 09 02:38:56 2008 +0200 1.3 @@ -1,13 +1,13 @@ 1.4 #!/usr/bin/perl 1.5 1.6 -$string="abcdefghijklmnopqrstuvwxyz"; 1.7 -$insert="\e[1K\e[10D"; 1.8 -$max=5; 1.9 +my $string=$_[0]; 1.10 +my $insert="\e[1K\e[10D"; 1.11 +my $max=5; 1.12 1.13 while (length($string) > $max) { 1.14 $res .= substr($string, 0, $max).$insert; 1.15 $string = substr($string, $max); 1.16 } 1.17 $res .= $string.$insert; 1.18 -print "$res\n"; 1.19 +print "$res"; 1.20