diff options
-rw-r--r-- | Doc/Zsh/compwid.yo | 3 | ||||
-rw-r--r-- | Src/Zle/compcore.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Doc/Zsh/compwid.yo b/Doc/Zsh/compwid.yo index b9abf4126..c32cc402d 100644 --- a/Doc/Zsh/compwid.yo +++ b/Doc/Zsh/compwid.yo @@ -420,7 +420,8 @@ The supported flags are: startitem() item(tt(-P) var(prefix))( This gives a string to be inserted before the given var(words). The -string given is not considered as part of the match. +string given is not considered as part of the match and any shell +metacharacters in it will not be quoted when the string is inserted. ) item(tt(-S) var(suffix))( Like tt(-P) but gives a string to be inserted after the match. diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index dc1abc8cf..4828d6d0b 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -1629,9 +1629,7 @@ addmatches(Cadata dat, char **argv) llsl = strlen(lsuf); /* Test if there is an existing -P prefix. */ if (dat->pre && *dat->pre) { - char *dp = rembslash(dat->pre); - - pl = pfxlen(dp, lpre); + pl = pfxlen(dat->pre, lpre); llpl -= pl; lpre += pl; } |