about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-02-02 11:46:51 +0000
committerEric Wong <e@80x24.org>2021-02-03 07:32:35 +0000
commita513747e10a5cc796411e901b415bbe6336c3f4d (patch)
tree030816a0eb16ee09d154052de74924534c3899e4
parente13d3ef99e8a106443dc0148b62ff64738267cff (diff)
downloadpublic-inbox-a513747e10a5cc796411e901b415bbe6336c3f4d.tar.gz
Some of our command-line switches take no arguments, and need
no completion for those arguments.
-rw-r--r--lib/PublicInbox/LEI.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index ffbc2503..b0a8358a 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -737,8 +737,7 @@ sub lei__complete {
                 my $opt = quotemeta $1;
                 puts $self, map {
                         my $v = $OPTDESC{$_};
-                        $v = $v->[0] if ref($v);
-                        my @v = split(/\|/, $v);
+                        my @v = ref($v) ? split(/\|/, $v->[0]) : ();
                         # get rid of ALL CAPS placeholder (e.g "OUT")
                         # (TODO: completion for external paths)
                         shift(@v) if uc($v[0]) eq $v[0];