diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cli.zsh | 6 | ||||
-rw-r--r-- | lib/functions.zsh | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/cli.zsh b/lib/cli.zsh index bf783d9f3..b71f6d9ce 100644 --- a/lib/cli.zsh +++ b/lib/cli.zsh @@ -573,13 +573,13 @@ function _omz::pr::test { # Rebase pull request branch against the current master _omz::log info "rebasing PR #$1..." - local gpgsign + local ret gpgsign { # Back up commit.gpgsign setting: use --local to get the current repository # setting, not the global one. If --local is not a known option, it will # exit with a 129 status code. - gpgsign=$(command git config --local commit.gpgsign 2>/dev/null) - [[ $? -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null) + gpgsign=$(command git config --local commit.gpgsign 2>/dev/null) || ret=$? + [[ $ret -ne 129 ]] || gpgsign=$(command git config commit.gpgsign 2>/dev/null) command git config commit.gpgsign false command git rebase master ohmyzsh/pull-$1 || { diff --git a/lib/functions.zsh b/lib/functions.zsh index 61f4dd49e..dfcc4d961 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -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 |