diff options
author | Eric Wong <e@80x24.org> | 2021-01-21 19:46:24 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-22 16:18:01 -0400 |
commit | c34f065076177f414f5328a85f675a40804d5c9f (patch) | |
tree | 2c66c03a317d18d3217d1e4ab0ca8559ab55343c /lib/PublicInbox/LEI.pm | |
parent | ec1f473957a529cc51a381e64274e42c03c6487b (diff) | |
download | public-inbox-c34f065076177f414f5328a85f675a40804d5c9f.tar.gz |
The tricky bit was getting around word splitting bash does on URLs. This may work with other shells, too.
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-rw-r--r-- | lib/PublicInbox/LEI.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 9c3d7279..ef3f90fc 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -655,6 +655,10 @@ sub lei__complete { } elsif ($cmd eq 'config' && !@argv && !$CONFIG_KEYS{$cur}) { puts $self, grep(/$re/, keys %CONFIG_KEYS); } + $cmd =~ tr/-/_/; + if (my $sub = $self->can("_complete_$cmd")) { + puts $self, $sub->($self, @argv, $cur); + } # TODO: URLs, pathnames, OIDs, MIDs, etc... See optparse() for # proto parsing. } |