diff options
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r-- | lib/PublicInbox/LeiQuery.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index cb5ac8fb..c65b00ca 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -158,11 +158,11 @@ no query allowed on command-line with --stdin # shell completion helper called by lei__complete sub _complete_q { my ($self, @argv) = @_; - my $ext = qr/\A(?:-I|(?:--(?:include|exclude|only)))\z/; my @cur; + my $cb = $self->lazy_cb(qw(forget-external _complete_)); while (@argv) { - if ($argv[-1] =~ $ext) { - my @c = $self->_complete_forget_external(@cur); + if ($argv[-1] =~ /\A(?:-I|(?:--(?:include|exclude|only)))\z/) { + my @c = $cb->($self, @cur); # try basename match: if (scalar(@cur) == 1 && index($cur[0], '/') < 0) { my $all = $self->externals_each; |