diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-09-20 15:20:22 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-09-20 15:20:22 +0300 |
commit | c000eddcff0fb38df2d0137efe24d9d2d900f209 (patch) | |
tree | fc3f161bcd73f17dd7f9c65f3ed90abab09c4f2b | |
parent | e645b79db3521e480aafdfa3e957cc20da7f1e7f (diff) |
pull upstream changes from gitstatus
-rw-r--r-- | gitstatus/gitstatus.plugin.zsh | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh index a10e6ce4..bb9e64e1 100644 --- a/gitstatus/gitstatus.plugin.zsh +++ b/gitstatus/gitstatus.plugin.zsh @@ -48,13 +48,12 @@ [[ -o 'interactive' ]] || 'return' -# Temporarily disable aliases. -if [[ -o 'aliases' ]]; then - 'builtin' 'unsetopt' 'aliases' - local _gitstatus_restore_aliases=1 -else - local _gitstatus_restore_aliases=0 -fi +# Temporarily change options. +'builtin' 'local' '-a' '_gitstatus_opts' +[[ ! -o 'aliases' ]] || _gitstatus_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || _gitstatus_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || _gitstatus_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' autoload -Uz add-zsh-hook zmodload zsh/datetime zsh/system @@ -523,5 +522,5 @@ function gitstatus_check() { [[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${1}}} ]] } -(( ! _gitstatus_restore_aliases )) || setopt aliases -'builtin' 'unset' '_gitstatus_restore_aliases' +setopt ${_gitstatus_opts[@]} +'builtin' 'unset' '_gitstatus_opts' |