diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-15 11:01:41 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-15 11:01:41 +0000 |
commit | 2e78e1ecc11973a0bc785b4a97e760e21d2059c4 (patch) | |
tree | ae248e393c282ded99856aa4bbbfc01b15796504 | |
parent | 3f630b6abf9b5bf7c93e74497e03a60ac0447bf4 (diff) | |
download | zsh-2e78e1ecc11973a0bc785b4a97e760e21d2059c4.tar.gz zsh-2e78e1ecc11973a0bc785b4a97e760e21d2059c4.tar.xz zsh-2e78e1ecc11973a0bc785b4a97e760e21d2059c4.zip |
fix for empty (s::) separator and strings with meta-characters (11368)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/utils.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index f7a300106..895bbc3d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-05-15 Sven Wischnowsky <wischnow@zsh.org> + * 11368: Src/utils.c: fix for empty (s::) separator and strings + with meta-characters + * 11365: Src/Zle/zle_tricky.c: fix for completion of string with single quote diff --git a/Src/utils.c b/Src/utils.c index e109d8ba5..170254fe3 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1764,7 +1764,14 @@ findsep(char **s, char *sep) return i; } if (!sep[0]) { - return **s ? ++*s, 1 : -1; + if (**s) { + if (**s == Meta) + *s += 2; + else + ++*s; + return 1; + } + return -1; } for (i = 0; **s; i++) { for (t = sep, tt = *s; *t && *tt && *t == *tt; t++, tt++); |