diff options
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 ); |