diff --git a/.bashrc b/.bashrc index 26574fc..4526b69 100644 --- a/.bashrc +++ b/.bashrc @@ -112,9 +112,9 @@ __prompt_git_status() { GIT_PROMPT_MARKER_SET=1 } [[ -z "$GIT_PROMPT_MARKER_SET" ]] && [[ -n "$GIT_PROMPT_SHOW_UNSTAGED" ]] && { - timeout 2s git ls-files --modified --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1 + timeout --signal=KILL 2s git ls-files --modified --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1 ERR=$? - if (( ERR == 124 )); then + if (( ERR == 124 )) || (( ERR == 137 )); then GIT_PROMPT+=" _" GIT_PROMPT_MARKER_SET=1 elif (( ERR == 0 )); then @@ -127,9 +127,9 @@ __prompt_git_status() { GIT_PROMPT_MARKER_SET=1 } [[ -z "$GIT_PROMPT_MARKER_SET" ]] && [[ -n "$GIT_PROMPT_SHOW_UNTRACKED" ]] && { - timeout 2s git ls-files git ls-files --others --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1 + timeout --signal=KILL 2s git ls-files git ls-files --others --exclude-standard --directory --error-unmatch -- ':/*' >/dev/null 2>&1 ERR=$? - if (( ERR == 124 )); then + if (( ERR == 124 )) || (( ERR == 137 )); then GIT_PROMPT+=" _" GIT_PROMPT_MARKER_SET=1 elif (( ERR == 0 )); then