lilalo

view 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 source
1 #!/usr/bin/perl
3 my $string=$_[0];
4 my $insert="\e[1K\e[10D";
5 my $max=5;
7 while (length($string) > $max) {
8 $res .= substr($string, 0, $max).$insert;
9 $string = substr($string, $max);
10 }
11 $res .= $string.$insert;
12 print "$res";