"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Ack.pm" between
ack-2.26.tar.gz and ack-2.28.tar.gz

About: ack is a Perl code-searching tool, similar to grep but optimized for programmers searching large trees of source code.

Ack.pm  (ack-2.26):Ack.pm  (ack-2.28)
skipping to change at line 16 skipping to change at line 16
=head1 NAME =head1 NAME
App::Ack App::Ack
=head1 DESCRIPTION =head1 DESCRIPTION
A container for functions for the ack program. A container for functions for the ack program.
=head1 VERSION =head1 VERSION
Version 2.26 Version 2.28
=cut =cut
our $VERSION; our $VERSION;
our $COPYRIGHT; our $COPYRIGHT;
BEGIN { BEGIN {
$VERSION = '2.26'; $VERSION = '2.28';
$COPYRIGHT = 'Copyright 2005-2019 Andy Lester.'; $COPYRIGHT = 'Copyright 2005-2019 Andy Lester.';
} }
our $fh; our $fh;
BEGIN { BEGIN {
$fh = *STDOUT; $fh = *STDOUT;
} }
our %types; our %types;
skipping to change at line 427 skipping to change at line 427
Display the RGB help subpage. Display the RGB help subpage.
=cut =cut
sub show_help_rgb { sub show_help_rgb {
App::Ack::print( <<'END_OF_HELP' ); App::Ack::print( <<'END_OF_HELP' );
ack allows customization of the colors it uses when presenting matches ack allows customization of the colors it uses when presenting matches
onscreen. See the "ACK COLORS" section of the ack manual (ack --man). onscreen. See the "ACK COLORS" section of the ack manual (ack --man).
Here is a grid of the 216 possible RGB colors. For the standard color Colors may be specified as "rggNNN" where "NNN" is a triplet of digits
grid, run ack --help-colors. from 0 to 5 specifying the intensity of red, green and blue, respectively.
Here is a grid of the 216 possible values for NNN.
END_OF_HELP END_OF_HELP
_show_rgb_grid(); _show_rgb_grid();
App::Ack::say( 'Here are the 216 possible colors with the "reverse" modifier
applied.', "\n" );
_show_rgb_grid( 'reverse' );
return; return;
} }
sub _show_color_grid { sub _show_color_grid {
my $cell_width = 7; my $cell_width = 7;
my @fg_colors = qw( black red green yellow blue magenta cyan white ); my @fg_colors = qw( black red green yellow blue magenta cyan white );
my @bg_colors = map { "on_$_" } @fg_colors; my @bg_colors = map { "on_$_" } @fg_colors;
App::Ack::say( App::Ack::say(
skipping to change at line 481 skipping to change at line 488
my $text = shift; my $text = shift;
my $color = shift; my $color = shift;
my $cell_width = 7; my $cell_width = 7;
$text = sprintf( '%-*s', $cell_width, $text ); $text = sprintf( '%-*s', $cell_width, $text );
return ($color ? Term::ANSIColor::colored( $text, $color ) : $text) . ' '; return ($color ? Term::ANSIColor::colored( $text, $color ) : $text) . ' ';
} }
sub _show_rgb_grid { sub _show_rgb_grid {
for my $r ( 0 .. 5 ) { my $modifier = shift || '';
for my $g ( 0 .. 5 ) {
for my $b ( 0 ..5 ) { my $grid = <<'HERE';
my $rgb = "$r$g$b"; 544 544 544 544 544 554 554 554 554 554 454 454 454 454 454 455 455 455 455 455
my $code = "rgb$r$g$b"; 445 445 445 445 445 545 545 545 545 545
533 533 533 543 543 553 553 553 453 453 353 353 353 354 354 355 355 355 345 345
App::Ack::print( 335 335 335 435 435 535 535 535 534 534
Term::ANSIColor::colored( $code, $code ), 511 521 531 531 541 551 451 451 351 251 151 152 152 153 154 155 145 145 135 125
Term::ANSIColor::colored( $code, "reverse $code" ), 115 215 215 315 415 515 514 514 513 512
' ' 500 510 520 530 540 550 450 350 250 150 050 051 052 053 054 055 045 035 025 015
); 005 105 205 305 405 505 504 503 502 501
} 400 410 410 420 430 440 340 340 240 140 040 041 041 042 043 044 034 034 024 014
App::Ack::say( '' ); 004 104 104 204 304 404 403 403 402 401
} 300 300 310 320 320 330 330 230 130 130 030 030 031 032 032 033 033 023 013 013
} 003 003 103 203 203 303 303 302 301 301
200 200 200 210 210 220 220 220 120 120 020 020 020 021 021 022 022 022 012 012
002 002 002 102 102 202 202 202 201 201
100 100 100 100 100 110 110 110 110 110 010 010 010 010 010 011 011 011 011 011
001 001 001 001 001 101 101 101 101 101
522 522 532 542 542 552 552 452 352 352 252 252 253 254 254 255 255 245 235 235
225 225 325 425 425 525 525 524 523 523
411 411 421 431 431 441 441 341 241 241 141 141 142 143 143 144 144 134 124 124
114 114 214 314 314 414 414 413 412 412
422 422 432 432 432 442 442 442 342 342 242 242 242 243 243 244 244 244 234 234
224 224 224 324 324 424 424 424 423 423
311 311 311 321 321 331 331 331 231 231 131 131 131 132 132 133 133 133 123 123
113 113 113 213 213 313 313 313 312 312
433 433 433 433 433 443 443 443 443 443 343 343 343 343 343 344 344 344 344 344
334 334 334 334 334 434 434 434 434 434
211 211 211 211 211 221 221 221 221 221 121 121 121 121 121 122 122 122 122 122
112 112 112 112 112 212 212 212 212 212
322 322 322 322 322 332 332 332 332 332 232 232 232 232 232 233 233 233 233 233
223 223 223 223 223 323 323 323 323 323
555 555 555 555 555 555 555 555 555 555 555 555 555 555 555 555 555 555 555 555
555 555 555 555 555 555 555 555 555 555
444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444 444
444 444 444 444 444 444 444 444 444 444
333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333 333
333 333 333 333 333 333 333 333 333 333
222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222
222 222 222 222 222 222 222 222 222 222
111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111 111
111 111 111 111 111 111 111 111 111 111
000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
000 000 000 000 000 000 000 000 000 000
HERE
$grid =~ s/(\d\d\d)/Term::ANSIColor::colored( "$1", "$modifier rgb$1" )/eg;
App::Ack::say( $grid );
return;
} }
=head2 show_help_types() =head2 show_help_types()
Display the filetypes help subpage. Display the filetypes help subpage.
=cut =cut
sub show_help_types { sub show_help_types {
App::Ack::print( <<'END_OF_HELP' ); App::Ack::print( <<'END_OF_HELP' );
 End of changes. 5 change blocks. 
19 lines changed or deleted 71 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)