Skip to content
Permalink
Browse files
fix(lib): encode all arguments besides the first in omz_urlencode
  • Loading branch information
mcornella committed May 15, 2022
1 parent dfee71c commit 39b600e9e564db3dec265fcf2e3db4b5568dd93a
Showing 1 changed file with 2 additions and 2 deletions.
@@ -144,7 +144,7 @@ zmodload zsh/langinfo
# Returns nonzero if encoding failed.
#
# Usage:
# omz_urlencode [-r] [-m] [-P] <string>
# omz_urlencode [-r] [-m] [-P] <string> [<string> ...]
#
# -r causes reserved characters (;/?:@&=+$,) to be escaped
#
@@ -156,7 +156,7 @@ function omz_urlencode() {
local -a opts
zparseopts -D -E -a opts r m P

local in_str=$1
local in_str="$@"
local url_str=""
local spaces_as_plus
if [[ -z $opts[(r)-P] ]]; then spaces_as_plus=1; fi

0 comments on commit 39b600e

Please sign in to comment.