lilalo
annotate l3prompt @ 116:f45ba4b5dc7f
l3-config added
| author | igor | 
|---|---|
| date | Sun Mar 09 23:04:58 2008 +0200 (2008-03-09) | 
| parents | da65f1cbaf3a | 
| children | 9bb58a1eee2b | 
| rev | line source | 
|---|---|
| igor@112 | 1 #!/usr/bin/perl | 
| igor@112 | 2 | 
| igor@114 | 3 my $string=$_[0]; | 
| igor@114 | 4 my $insert="\e[1K\e[10D"; | 
| igor@114 | 5 my $max=5; | 
| igor@112 | 6 | 
| igor@112 | 7 while (length($string) > $max) { | 
| igor@112 | 8 $res .= substr($string, 0, $max).$insert; | 
| igor@112 | 9 $string = substr($string, $max); | 
| igor@112 | 10 } | 
| igor@112 | 11 $res .= $string.$insert; | 
| igor@114 | 12 print "$res"; | 
| igor@112 | 13 | 
