From b95f39dfdb659097af23465ec2a533a254fd4ac5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 23 Jan 2024 06:54:09 +0100 Subject: Adding upstream version 1.13~rc1. Signed-off-by: Daniel Baumann --- zgrep.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'zgrep.cc') diff --git a/zgrep.cc b/zgrep.cc index e2c436b..b127158 100644 --- a/zgrep.cc +++ b/zgrep.cc @@ -52,8 +52,8 @@ void show_help() "given is compressed, its decompressed content is used. If a file given\n" "does not exist, and its name does not end with one of the known\n" "extensions, zgrep tries the compressed file names corresponding to the\n" - "formats supported. If a file fails to decompress, zgrep continues\n" - "searching the rest of the files.\n" + "formats supported until one is found. If a file fails to decompress, zgrep\n" + "continues searching the rest of the files.\n" "\nIf a file is specified as '-', data are read from standard input,\n" "decompressed if needed, and fed to grep. Data read from standard input\n" "must be of the same type; all uncompressed or all in the same\n" @@ -338,7 +338,8 @@ int main( const int argc, const char * const argv[] ) case color_opt: color_option = "--color"; if( !sarg.empty() ) { color_option += '='; color_option += sarg; } break; - case label_opt: label_option = sarg; label = arg; break; + case label_opt: label_option = "--label="; label_option += sarg; + label = arg; break; case linebuf_opt: grep_args.push_back( "--line-buffered" ); line_buffered = true; break; case bz2_opt: parse_compressor( sarg, pn, fmt_bz2 ); break; @@ -346,14 +347,14 @@ int main( const int argc, const char * const argv[] ) case lz_opt: parse_compressor( sarg, pn, fmt_lz ); break; case xz_opt: parse_compressor( sarg, pn, fmt_xz ); break; case zst_opt: parse_compressor( sarg, pn, fmt_zst ); break; - default : internal_error( "uncaught option." ); + default: internal_error( "uncaught option." ); } } // end process options if( !color_option.empty() ) // push the last value set grep_args.push_back( color_option.c_str() ); if( !label_option.empty() ) // for "Binary file