mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-22 12:20:07 +00:00
pull upstream changes from gitstatus
This commit is contained in:
parent
182f0f7162
commit
f90bf482a5
1 changed files with 3 additions and 3 deletions
|
@ -119,7 +119,7 @@ function gitstatus_query() {
|
||||||
(( OPTIND == ARGC )) || { echo "usage: gitstatus_query [OPTION]... NAME" >&2; return 1 }
|
(( OPTIND == ARGC )) || { echo "usage: gitstatus_query [OPTION]... NAME" >&2; return 1 }
|
||||||
local name=${*[$OPTIND]}
|
local name=${*[$OPTIND]}
|
||||||
|
|
||||||
[[ -v GITSTATUS_DAEMON_PID_${name} ]]
|
[[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]]
|
||||||
|
|
||||||
# Verify that gitstatus_query is running in the same process that ran gitstatus_start.
|
# Verify that gitstatus_query is running in the same process that ran gitstatus_start.
|
||||||
local client_pid_var=_GITSTATUS_CLIENT_PID_${name}
|
local client_pid_var=_GITSTATUS_CLIENT_PID_${name}
|
||||||
|
@ -224,7 +224,7 @@ function gitstatus_start() {
|
||||||
(( OPTIND == ARGC )) || { echo "usage: gitstatus_start [OPTION]... NAME" >&2; return 1 }
|
(( OPTIND == ARGC )) || { echo "usage: gitstatus_start [OPTION]... NAME" >&2; return 1 }
|
||||||
local name=${*[$OPTIND]}
|
local name=${*[$OPTIND]}
|
||||||
|
|
||||||
[[ ! -v GITSTATUS_DAEMON_PID_${name} ]] || return 0
|
[[ -z ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]] || return 0
|
||||||
|
|
||||||
local os && os=$(uname -s) && [[ -n $os ]]
|
local os && os=$(uname -s) && [[ -n $os ]]
|
||||||
local arch && arch=$(uname -m) && [[ -n $arch ]]
|
local arch && arch=$(uname -m) && [[ -n $arch ]]
|
||||||
|
@ -319,5 +319,5 @@ function gitstatus_start() {
|
||||||
# If it returns non-zero, gitstatus_query NAME is guaranteed to return non-zero.
|
# If it returns non-zero, gitstatus_query NAME is guaranteed to return non-zero.
|
||||||
function gitstatus_check() {
|
function gitstatus_check() {
|
||||||
local name=$1
|
local name=$1
|
||||||
[[ -v GITSTATUS_DAEMON_PID_${name} ]]
|
[[ -n ${(P)${:-GITSTATUS_DAEMON_PID_${name}}:-} ]]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue