浏览代码

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
Marc Cornellà 3 年之前
父节点
当前提交
a3e0f4f2af
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      lib/functions.zsh

+ 1 - 0
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