diff --git a/gitstatus/gitstatus.plugin.sh b/gitstatus/gitstatus.plugin.sh index 9a75cb5f..d1939989 100644 --- a/gitstatus/gitstatus.plugin.sh +++ b/gitstatus/gitstatus.plugin.sh @@ -371,7 +371,7 @@ function gitstatus_query() { local req_id="$RANDOM.$RANDOM.$RANDOM.$RANDOM" if [[ -z "${GIT_DIR:-}" ]]; then - [[ "$dir" == /* ]] || dir="$(pwd -P)/$dir" || return + [[ "${dir-}" == /* ]] || dir="$(pwd -P)/${dir-}" || return elif [[ "$GIT_DIR" == /* ]]; then dir=:"$GIT_DIR" else