Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 46 lines (40 sloc) 0.695 kB
#!/usr/bin/perl
use strict;
use Term::ExtendedColor 'fg';
chomp(my $pwd = `pwd`);
my @chars = split//, $pwd;
my $i = 1;
for(@chars) {
if($_ eq '/') {
if(defined($ENV{DISPLAY})) {
if($i == 1) {
print fg('green28', fg('bold', " /"));
$i++;
next;
}
}
else {
if($i == 1) {
print "\e[31;1m /\e[0m";
$i++;
next;
}
}
if(defined($ENV{DISPLAY})) {
print fg("yellow$i", " » ");
$i += 6
}
else {
print "\e[33m > \e[0m";
$i += 6;
}
}
else {
if(defined($ENV{DISPLAY})) {
print fg('green28', $_);
}
else {
print "\e[34m$_\e[0m";
}
}
}
Jump to Line
Something went wrong with that request. Please try again.