]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LEI.pm
lei: always use 3-arg open perlop
[public-inbox.git] / lib / PublicInbox / LEI.pm
index 887025de5dedb608576b2263b4f20c0596fce8e5..4e0295fa4e8a18200aa67719b3281add5b5a696e 100644 (file)
@@ -411,6 +411,9 @@ my %OPTDESC = (
 'url   ls-mail-source' => 'show full URL of newsgroup or IMAP folder',
 'format|f=s    ls-external' => $ls_format,
 
+'prune:s       forget-search' =>
+       ['TYPE|local|remote', 'prune all, remote or local folders' ],
+
 'limit|n=i@' => ['NUM', 'limit on number of matches (default: 10000)' ],
 'offset=i' => ['OFF', 'search result offset (default: 0)'],
 
@@ -815,7 +818,8 @@ sub dispatch {
                                next if $d eq ''; # same as git(1)
                                chdir $d or return fail($self, "cd $d: $!");
                        }
-                       open $self->{3}, '.' or return fail($self, "open . $!");
+                       open $self->{3}, '<', '.' or
+                               return fail($self, "open . $!");
                }
                $cb->($self, @argv);
        } elsif (grep(/\A-/, $cmd, @argv)) { # --help or -h only