# NOTE: Derived from lib/Env/PS1.pm.
# Changes made here will be lost when autosplit is run again.
# See AutoSplit.pm.
package Env::PS1;

#line 376 "lib/Env/PS1.pm (autosplit into blib/lib/auto/Env/PS1/C.al)"
sub C {
	our %colours = ( # Copied from Term::ANSIScreen
		'clear'      => 0,    'reset'      => 0,
		'bold'       => 1,    'dark'       => 2,
		'underline'  => 4,    'underscore' => 4,
		'blink'      => 5,    'reverse'    => 7,
		'concealed'  => 8,

		'black'      => 30,   'on_black'   => 40,
		'red'        => 31,   'on_red'     => 41,
		'green'      => 32,   'on_green'   => 42,
		'yellow'     => 33,   'on_yellow'  => 43,
		'blue'       => 34,   'on_blue'    => 44,
		'magenta'    => 35,   'on_magenta' => 45,
		'cyan'       => 36,   'on_cyan'    => 46,
		'white'      => 37,   'on_white'   => 47,
	);
	no warnings;
	*C = sub {
		return if defined $ENV{CLICOLOR} and ! $ENV{CLICOLOR};
		my @attr = split ',', $_[2];
		#print "# $_[2] => \\e[" . join(';', map {$colours{lc($_)}} @attr) . "m\n";
		return "\e[" . join(';', map {$colours{lc($_)}} @attr) . "m";
	};
	C(@_);
}

# end of Env::PS1::C
1;
