summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
authorHan Pingtian <hanpt@linux.vnet.ibm.com>2015-06-18 10:37:39 +0800
committerPeter Stephenson <pws@zsh.org>2015-06-24 14:56:32 +0100
commit77130df6747c94c44ea4cb522177d611a24fd5d0 (patch)
tree4208d38b972a63de512c2a4f6835d5edd8d1cb60 /Src
parent7b46509e92dbef7bbe26b74d241dd906eaed0aef (diff)
downloadzsh-77130df6747c94c44ea4cb522177d611a24fd5d0.tar.gz
zsh-77130df6747c94c44ea4cb522177d611a24fd5d0.zip
35514: [[:foo:]] tests in completion should be more specific
Diffstat (limited to 'Src')
-rw-r--r--Src/pattern.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index 7e07548f9..8fa1a727f 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1113,8 +1113,8 @@ range_type(char *start, int len)
const char **csp;
for (csp = colon_stuffs; *csp; csp++) {
- if (!strncmp(start, *csp, len))
- return (csp - colon_stuffs) + PP_FIRST;
+ if (strlen(*csp) == len && !strncmp(start, *csp, len))
+ return (csp - colon_stuffs) + PP_FIRST;
}
return PP_UNKWN;