print usage on no args too

Sat, 21 Jan 2017 23:30:10 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 21 Jan 2017 23:30:10 -0500
changeset 485
a58682115510
parent 484
a32d6511d251
child 486
608ad4499439

print usage on no args too

bin/archive-dir file | annotate | diff | comparison | revisions
--- a/bin/archive-dir
+++ b/bin/archive-dir
@@ -23,7 +23,7 @@ sub main {
     ['yes|y'   => "actually move stuff"],
     ['help|h'  => "print usage message and exit", {shortcircuit => 1}],
   );
-  print($usage->text), exit if $opt->help;
+  print($usage->text), exit if $opt->help || !@ARGV;
 
   archive_dir($opt, $_) for @ARGV;
 }

mercurial