]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiExternal.pm
lei: various completion improvements
[public-inbox.git] / lib / PublicInbox / LeiExternal.pm
index d802f0e2b5060b03eab56a8e34dfea51e84b9c03..f8e610cacb2115156691693b0fbe357fa1204792 100644 (file)
@@ -241,6 +241,11 @@ sub complete_url_prepare {
                $re = quotemeta($re);
        }
        my $match_cb = sub {
+               # the "//;" here (for AUTH=ANONYMOUS) interacts badly with
+               # bash tab completion, strip it out for now since our commands
+               # work w/o it.  Not sure if there's a better solution...
+               $_[0] =~ s!//;AUTH=ANONYMOUS\@!//!i;
+               $_[0] =~ s!;!\\;!g;
                # only return the part specified on the CLI
                # don't duplicate if already 100% completed
                $_[0] =~ /\A$re(\Q$cur\E.*)/ ? ($cur eq $1 ? () : $1) : ()