From: Brendan O'Dea Date: Mon, 6 May 2002 14:04:48 +0000 (+1000) Subject: Term/Complete.pm: quote metachars X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca63c81071474b367f4513b49806c0e322d087ac;p=p5sagit%2Fp5-mst-13.2.git Term/Complete.pm: quote metachars Message-Id: <20020506040448.GA8241@londo.odea.dropbear.id.au> p4raw-id: //depot/perl@16424 --- diff --git a/lib/Term/Complete.pm b/lib/Term/Complete.pm index 308af04..e20b2a6 100644 --- a/lib/Term/Complete.pm +++ b/lib/Term/Complete.pm @@ -116,7 +116,7 @@ sub Complete { CASE: { # (TAB) attempt completion $_ eq "\t" && do { - @match = grep(/^$return/, @cmp_lst); + @match = grep(/^\Q$return/, @cmp_lst); unless ($#match < 0) { $l = length($test = shift(@match)); foreach $cmp (@match) { @@ -133,7 +133,7 @@ sub Complete { # (^D) completion list $_ eq $complete && do { - print(join("\r\n", '', grep(/^$return/, @cmp_lst)), "\r\n"); + print(join("\r\n", '', grep(/^\Q$return/, @cmp_lst)), "\r\n"); redo LOOP; };