lilalo
annotate l3prompt @ 158:d775ffd49dbf
minifix: bsd/darwin in uname
author | Igor Chubin <igor@chub.in> |
---|---|
date | Wed Feb 01 17:14:54 2012 +0200 (2012-02-01) |
parents | 658b4ea105c1 |
children |
rev | line source |
---|---|
igor@112 | 1 #!/usr/bin/perl |
igor@112 | 2 |
igor@117 | 3 my $string=$ARGV[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 |