mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-12 19:18:28 +02:00
pull upstream changes from gitstatus
This commit is contained in:
parent
a8cdc46a15
commit
c8c74ec29f
@ -442,7 +442,7 @@ function gitstatus_start() {
|
|||||||
file_prefix=${(P)${:-_GITSTATUS_FILE_PREFIX_$name}}
|
file_prefix=${(P)${:-_GITSTATUS_FILE_PREFIX_$name}}
|
||||||
else
|
else
|
||||||
local log_level=$GITSTATUS_LOG_LEVEL
|
local log_level=$GITSTATUS_LOG_LEVEL
|
||||||
local file_prefix=${${TMPDIR:-/tmp}:A}/gitstatus.$EUID.$sysparams[pid].$EPOCHSECONDS
|
local file_prefix=${${TMPDIR:-/tmp}:A}/gitstatus.$name.$EUID.$sysparams[pid].$EPOCHSECONDS
|
||||||
(( GITSTATUS_ENABLE_LOGGING )) && : ${log_level:=INFO}
|
(( GITSTATUS_ENABLE_LOGGING )) && : ${log_level:=INFO}
|
||||||
if [[ -n $log_level ]]; then
|
if [[ -n $log_level ]]; then
|
||||||
xtrace=$file_prefix.xtrace.log
|
xtrace=$file_prefix.xtrace.log
|
||||||
@ -501,25 +501,37 @@ function gitstatus_start() {
|
|||||||
elif [[ -n $GITSTATUS_DAEMON ]]; then
|
elif [[ -n $GITSTATUS_DAEMON ]]; then
|
||||||
local daemons=($_gitstatus_plugin_dir/{usrbin,bin}/$GITSTATUS_DAEMON)
|
local daemons=($_gitstatus_plugin_dir/{usrbin,bin}/$GITSTATUS_DAEMON)
|
||||||
else
|
else
|
||||||
local os
|
local -aU os
|
||||||
case $kernel in
|
case $kernel in
|
||||||
linux)
|
linux)
|
||||||
os="${(L)$(uname -o)}" || return
|
os=("${(L)$(uname -o)}") || return
|
||||||
[[ -n $os ]] || return
|
[[ -n $os[1] ]] || return
|
||||||
[[ $os == android ]] || os=linux
|
[[ $os[1] == android ]] || os[1]=linux
|
||||||
;;
|
;;
|
||||||
cygwin_nt-*) os=cygwin_nt-10.0;;
|
cygwin_nt-*) os=($kernel cygwin_nt-10.0);;
|
||||||
mingw|msys) os=msys_nt-10.0;;
|
mingw|msys) os=($kernel msys_nt-10.0);;
|
||||||
*) os=$kernel;;
|
*) os=($kernel);;
|
||||||
esac
|
esac
|
||||||
local arch
|
local arch
|
||||||
arch="${(L)$(uname -m)}" || return
|
arch="${(L)$(uname -m)}" || return
|
||||||
[[ -n $arch ]] || return
|
[[ -n $arch ]] || return
|
||||||
local daemons=($_gitstatus_plugin_dir/{usrbin,bin}/gitstatusd-$os-$arch{,-static})
|
local daemons=(
|
||||||
|
$_gitstatus_plugin_dir/{usrbin,bin}/gitstatusd-${^os}-$arch{,-static})
|
||||||
|
fi
|
||||||
|
|
||||||
|
local files=(${^daemons}(N:A))
|
||||||
|
daemons=(${^files}(N*))
|
||||||
|
|
||||||
|
if (( stderr_fd && $#daemons != $#files )); then
|
||||||
|
unsetopt xtrace
|
||||||
|
print -ru2 -- ''
|
||||||
|
print -ru2 -- 'ERROR: missing execute permissions on gitstatusd file(s):'
|
||||||
|
print -ru2 -- ''
|
||||||
|
print -ru2 -- ' '${(pj:\n :)${files:|daemons}}
|
||||||
|
print -ru2 -- ''
|
||||||
|
setopt xtrace
|
||||||
fi
|
fi
|
||||||
|
|
||||||
daemons=(${^daemons}(N:A))
|
|
||||||
daemons=(${^daemons}(N*))
|
|
||||||
(( $#daemons )) || return
|
(( $#daemons )) || return
|
||||||
|
|
||||||
if [[ $GITSTATUS_NUM_THREADS == <1-> ]]; then
|
if [[ $GITSTATUS_NUM_THREADS == <1-> ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user