diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-23 05:54:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-01-23 05:54:13 +0000 |
commit | e50d8921980602c5569b31dd9d12a24b43a196e8 (patch) | |
tree | d7240fd2cd209b129f72dac13832b6cfce13dc76 /zgrep.cc | |
parent | Releasing debian version 1.12-3. (diff) | |
download | zutils-e50d8921980602c5569b31dd9d12a24b43a196e8.tar.xz zutils-e50d8921980602c5569b31dd9d12a24b43a196e8.zip |
Merging upstream version 1.13~rc1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'zgrep.cc')
-rw-r--r-- | zgrep.cc | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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 <label> matches" - grep_args.push_back( label_option.insert( 0, "--label=" ).c_str() ); + grep_args.push_back( label_option.c_str() ); #if defined __MSVCRT__ || defined __OS2__ setmode( STDIN_FILENO, O_BINARY ); |