@ -168,13 +168,13 @@ function gitstatus_query"${1:-}"() {
done
done
if ( ( OPTIND != ARGC ) ) ; then
if ( ( OPTIND != ARGC ) ) ; then
print -ru2 -- "gitstatus_ start : exactly one positional argument is required"
print -ru2 -- "gitstatus_ query : exactly one positional argument is required"
return 1
return 1
fi
fi
local name = $* [ OPTIND]
local name = $* [ OPTIND]
if [ [ $name != [ [ :IDENT:] ] ## ]]; then
if [ [ $name != [ [ :IDENT:] ] ## ]]; then
print -ru2 -- " gitstatus_ start : invalid positional argument: $name "
print -ru2 -- " gitstatus_ query : invalid positional argument: $name "
return 1
return 1
fi
fi
@ -186,6 +186,12 @@ function gitstatus_query"${1:-}"() {
[ [ $GIT_DIR = = /* ] ] && dir = :$GIT_DIR || dir = :${ (%) :- %/ } /$GIT_DIR
[ [ $GIT_DIR = = /* ] ] && dir = :$GIT_DIR || dir = :${ (%) :- %/ } /$GIT_DIR
fi
fi
if [ [ $dir != ( | :) /* ] ] ; then
typeset -g VCS_STATUS_RESULT = norepo-sync
_gitstatus_clear$fsuf
return 0
fi
local -i req_fd = ${ (P) ${ :- _GITSTATUS_REQ_FD_ $name } }
local -i req_fd = ${ (P) ${ :- _GITSTATUS_REQ_FD_ $name } }
local req_id = $EPOCHREALTIME
local req_id = $EPOCHREALTIME
print -rnu $req_fd -- $req_id ' ' $callback $'\x1f' $dir $'\x1f' $no_diff $'\x1e' || return
print -rnu $req_fd -- $req_id ' ' $callback $'\x1f' $dir $'\x1f' $no_diff $'\x1e' || return