diff --git a/bin/expand b/bin/expand index a6ebd1c1..8717b3aa 100755 --- a/bin/expand +++ b/bin/expand @@ -41,7 +41,6 @@ EOF exit $_[0]; } -usage(1) unless scalar @ARGV > 0; usage(0) if grep /^-h$/, @ARGV; # at most one argument @@ -114,6 +113,9 @@ for my $file (@files) { close IN; } +unless (@files) { + do_expand ; +} __END__ @@ -125,9 +127,6 @@ expand - convert tabs to spaces expand [B<-h>] [B<-tabstop>] [B<-tab1, tab2, ...>] [B ...] -unexpand [B<-h>] [B<-a>] [B<-tabstop>] [B<-tab1, tab2, ...>] -[B ...] - =head1 DESCRIPTION I processes the named files or the standard input writing the @@ -140,10 +139,7 @@ If a single B argument is given, tabs are set B spaces apart instead of the default 8. If multiple tabstops are given then the tabs are set at those specific columns. -I puts tabs back into the data from the standard input or the -named files and writes the result on the standard output. - -Option (with I and I): +=head1 OPTIONS =over 4 @@ -153,19 +149,6 @@ Print a usage message and exit with a status code indicating success. =back -Option (with I only): - -=over 4 - -=item -a - -By default, only leading blanks and tabs are reconverted to maximal -strings of tabs. If the B<-a> option is given, tabs are inserted -whenever they would compress the resultant file by replacing two or -more characters. - -=back - =head1 AUTHOR =for html