diff options
-rwxr-xr-x | bsgrep | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -50,7 +50,7 @@ sub grep_options { } @ARGV = @nargv; - getopts('d:FhiklnNqrsvwz', \%opt) || exit 1; + getopts('d:FiklnNqrsvwz', \%opt) || exit 1; } sub print_line { @@ -60,14 +60,8 @@ sub print_line { print $opt{z} ? "\0" : "\n"; } -sub join_help { - print "usage: $self [--help | --version | -[knwz] [-d char] ...] [<file> ...]\n"; - exit 0; -} - sub join_options { - getopts('hd:knwz', \%opt) || exit 1; - join_help() if $opt{h}; + getopts('d:knwz', \%opt) || exit 1; } sub handle_line { @@ -214,9 +208,9 @@ bsjoin - join lines with backslash continuation =head1 SYNOPSIS -bsgrep [B<[-hknwz]> B<-d> I<char> I<...>] [B<-e> I<pattern> ... | I<pattern>] [I<file> I<...>] +bsgrep [B<[-FiklnNqrsvwz]> B<-d> I<char> I<...>] [B<-e> I<pattern> ... | I<pattern>] [I<file> I<...>] -bsjoin [B<[-hiklnqrsvwz]> B<-d> I<char> I<...>] [I<file> I<...>] +bsjoin [B<[-knwz]> B<-d> I<char> I<...>] [I<file> I<...>] =head1 DESCRIPTION @@ -237,7 +231,7 @@ match text split across continuation lines. If B<bsgrep> is run as B<bsjoin> (via symbolic or hard link, or just copying the executable), it will simply join together continued lines without searching for anything. In this mode, only the B<-k>, B<-n>, -B<-w>, B<-h>, B<--version>, and B<--help> options are supported. +B<-w>, B<--version>, and B<--help> options are supported. =head1 OPTIONS @@ -248,6 +242,9 @@ These options work with both B<bsgrep> and B<bsjoin>: =item -d I<char> Use I<char> as the continuation character, rather than a backslash. +Actually, there's no law that says it has to be a single character, +if you can think of a use for a string here... though it's treated as +a fixed string, not a regular expression. =item -k |