summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2020-11-09 18:33:59 +0100
committerMarc Cornellà <marc.cornella@live.com>2020-11-09 18:33:59 +0100
commita3e0f4f2afe03a207b98d4c0aaecb5bbaa796883 (patch)
tree4125bd00cc80120dad5449ce2e5878067996f1db
parentfa780867d9745bfbd6c190859645d4c92405d961 (diff)
downloadzsh-a3e0f4f2afe03a207b98d4c0aaecb5bbaa796883.tar.gz
zsh-a3e0f4f2afe03a207b98d4c0aaecb5bbaa796883.tar.bz2
zsh-a3e0f4f2afe03a207b98d4c0aaecb5bbaa796883.zip
fix(lib): make opts local in omz_urlencode to fix scoping bug
Fixes error message when using zplug, due to $opts having been declared as an associative array: omz_urlencode:2: bad set of key/value pairs for associative array Fixes #9429
-rw-r--r--lib/functions.zsh1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh
index 58f0e3fb0..15526cd5f 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -134,6 +134,7 @@ zmodload zsh/langinfo
# -P causes spaces to be encoded as '%20' instead of '+'
function omz_urlencode() {
emulate -L zsh
+ local -a opts
zparseopts -D -E -a opts r m P
local in_str=$1