mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
Fixed bug #62954: --color-failed outputs extra text.
This commit is contained in:
parent
034f220f86
commit
6cf9702f6c
|
@ -255,21 +255,21 @@ from:tange@gnu.org
|
|||
to:parallel@gnu.org, bug-parallel@gnu.org
|
||||
stable-bcc: Jesse Alama <jessealama@fastmail.fm>
|
||||
|
||||
Subject: GNU Parallel 20220822 ('Rushdie') released
|
||||
Subject: GNU Parallel 20220922 ('Sanna Marin') released
|
||||
|
||||
GNU Parallel 20220822 ('Rushdie') has been released. It is available for download at: lbry://@GnuParallel:4
|
||||
GNU Parallel 20220922 ('') has been released. It is available for download at: lbry://@GnuParallel:4
|
||||
|
||||
Quote of the month:
|
||||
|
||||
Parallel is Good Stuff (tm)
|
||||
-- bloopernova@ycombinator
|
||||
<<>>
|
||||
|
||||
New in this release:
|
||||
|
||||
* --header 0 allows using {filename} as replacement string
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
https://github.com/bfidatadigipres/dpx_encoding
|
||||
https://pypi.org/project/womm/
|
||||
|
||||
|
||||
GNU Parallel - For people who live life in the parallel lane.
|
||||
|
||||
|
|
31
src/parallel
31
src/parallel
|
@ -2838,6 +2838,7 @@ sub init_globals() {
|
|||
$ENV{'PARALLEL_HOME'}, $ENV{'XDG_CACHE_HOME'}."/parallel");
|
||||
$Global::cache_dir = $Global::cache_dirs[0] ||
|
||||
$ENV{'HOME'} . "/.parallel";
|
||||
Job::init_color();
|
||||
}
|
||||
|
||||
sub parse_halt() {
|
||||
|
@ -11639,25 +11640,25 @@ sub tag($) {
|
|||
sub color($) {
|
||||
my $self = shift;
|
||||
if(not defined $self->{'color'}) {
|
||||
if($Global::color or $opt::colorfailed) {
|
||||
init_color();
|
||||
if($Global::color) {
|
||||
# Choose a value based on the seq
|
||||
$self->{'color'} = $color[$self->seq() % ($#color+1)].$eol;
|
||||
}
|
||||
if($opt::colorfailed) {
|
||||
if($self->exitstatus()) {
|
||||
# White on Red
|
||||
# Can this be done more generally?
|
||||
$self->{'color'} = "\033[48;5;"."196".
|
||||
";38;5;"."231"."m".$eol;
|
||||
}
|
||||
}
|
||||
if($Global::color) {
|
||||
# Choose a value based on the seq
|
||||
$self->{'color'} = $color[$self->seq() % ($#color+1)].$eol;
|
||||
$self->{'reset_color'} = $reset_color;
|
||||
} else {
|
||||
$self->{'color'} = "";
|
||||
$self->{'reset_color'} = "";
|
||||
}
|
||||
if($opt::colorfailed) {
|
||||
if($self->exitstatus()) {
|
||||
# White on Red
|
||||
# Can this be done more generally?
|
||||
$self->{'color'} =
|
||||
"\033[48;5;"."196".";38;5;"."231"."m".$eol;
|
||||
$self->{'reset_color'} = $reset_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ($self->{'color'},$reset_color);
|
||||
return ($self->{'color'},$self->{'reset_color'});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,15 +65,15 @@ par_blocking_redir stderr
|
|||
par_blocking_redir stdout
|
||||
par_blocking_redir stdout
|
||||
par_colour_failed --colour-failed --colour
|
||||
par_colour_failed seq 1;exit 0(B[m
|
||||
par_colour_failed 1(B[m
|
||||
par_colour_failed seq 1;exit 0
|
||||
par_colour_failed 1
|
||||
par_colour_failed [48;5;196;38;5;231m[Kseq 1;exit 1(B[m
|
||||
par_colour_failed [48;5;196;38;5;231m[K1(B[m
|
||||
par_colour_failed [48;5;196;38;5;231m[Kseq 1;exit 2(B[m
|
||||
par_colour_failed [48;5;196;38;5;231m[K1(B[m
|
||||
par_colour_failed seq 2;exit 0(B[m
|
||||
par_colour_failed 1(B[m
|
||||
par_colour_failed 2(B[m
|
||||
par_colour_failed seq 2;exit 0
|
||||
par_colour_failed 1
|
||||
par_colour_failed 2
|
||||
par_colour_failed [48;5;196;38;5;231m[Kseq 2;exit 1(B[m
|
||||
par_colour_failed [48;5;196;38;5;231m[K1(B[m
|
||||
par_colour_failed [48;5;196;38;5;231m[K2(B[m
|
||||
|
|
Loading…
Reference in a new issue