diff options
| author | Peter Stephenson <pws@zsh.org> | 2016-06-03 10:28:03 +0100 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2016-06-03 10:28:52 +0100 |
| commit | dcffad8326878c1a4c539b9b32c6b497f4032e5d (patch) | |
| tree | 365e2a1311d0b244d7026443edc0b4c10f9ea39e | |
| parent | 38577: _signals: Don't complete SIGEXIT from _kill. (diff) | |
| download | zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.tar zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.tar.gz zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.tar.bz2 zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.tar.lz zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.tar.xz zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.tar.zst zsh-dcffad8326878c1a4c539b9b32c6b497f4032e5d.zip | |
38586: Metafication problem with $functions
If treated as a complete associative array or scanned (retrieving
individual values was not affected), it incorrectly unmetafied
the value so multibyte characters got confused.
Add test.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | Src/Modules/parameter.c | 5 | ||||
| -rw-r--r-- | Test/D07multibyte.ztst | 9 |
3 files changed, 15 insertions, 5 deletions
@@ -1,3 +1,9 @@ +2016-06-03 Peter Stephenson <p.stephenson@samsung.com> + + * 38586: Src/Modules/parameter.c, Test/D07multibyte.ztst: + Don't unmetafy values for $functions when passing back + within parameter framework. + 2016-06-03 Daniel Shahaf <d.s@daniel.shahaf.name> * 38577: Completion/Unix/Type/_signals: Don't complete SIGEXIT diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index edb051785..98bcaba6e 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -487,11 +487,6 @@ scanfunctions(UNUSED(HashTable ht), ScanFunc func, int flags, int dis) strcat(pm.u.str, " \"$@\""); } else pm.u.str = dyncat(start, t); - /* - * TBD: Is this unmetafy correct? Surely as this - * is a parameter value it stays metafied? - */ - unmetafy(pm.u.str, NULL); zsfree(t); if (shf->redir) { diff --git a/Test/D07multibyte.ztst b/Test/D07multibyte.ztst index 39ba5ef8b..dedf2417a 100644 --- a/Test/D07multibyte.ztst +++ b/Test/D07multibyte.ztst @@ -553,3 +553,12 @@ 0:${(q+)...} with printable multibyte characters >ホ >'She said "ホ". I said "You can'\''t '\''ホ'\'' me!' + +# This will silently succeed if zsh/parameter isn't available + (zmodload zsh/parameter >/dev/null 2>&1 + f() { + : $(:) + "↓" + } + : $functions) +0:Multibtye handled of functions parameter |
