mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-10-01 01:04:29 +00:00
pull upstream changes from gitstatus
This commit is contained in:
@@ -48,13 +48,12 @@
|
|||||||
|
|
||||||
[[ -o 'interactive' ]] || 'return'
|
[[ -o 'interactive' ]] || 'return'
|
||||||
|
|
||||||
# Temporarily disable aliases.
|
# Temporarily change options.
|
||||||
if [[ -o 'aliases' ]]; then
|
'builtin' 'local' '-a' '_gitstatus_opts'
|
||||||
'builtin' 'unsetopt' 'aliases'
|
[[ ! -o 'aliases' ]] || _gitstatus_opts+=('aliases')
|
||||||
local _gitstatus_restore_aliases=1
|
[[ ! -o 'sh_glob' ]] || _gitstatus_opts+=('sh_glob')
|
||||||
else
|
[[ ! -o 'no_brace_expand' ]] || _gitstatus_opts+=('no_brace_expand')
|
||||||
local _gitstatus_restore_aliases=0
|
'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand'
|
||||||
fi
|
|
||||||
|
|
||||||
autoload -Uz add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
zmodload zsh/datetime zsh/system
|
zmodload zsh/datetime zsh/system
|
||||||
@@ -523,5 +522,5 @@ function gitstatus_check() {
|
|||||||
[[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${1}}} ]]
|
[[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${1}}} ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
(( ! _gitstatus_restore_aliases )) || setopt aliases
|
setopt ${_gitstatus_opts[@]}
|
||||||
'builtin' 'unset' '_gitstatus_restore_aliases'
|
'builtin' 'unset' '_gitstatus_opts'
|
||||||
|
|||||||
Reference in New Issue
Block a user