diff --git a/gitprompt.sh b/gitprompt.sh index 168074b..0617867 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set echo function async_run() { { @@ -12,11 +13,11 @@ function git_prompt_dir() { if [ -z "$__GIT_PROMPT_DIR" ]; then local SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do - local DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + local DIR="$( command cd -P "$( dirname "$SOURCE" )" && pwd )" SOURCE="$(readlink "$SOURCE")" [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" done - __GIT_PROMPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + __GIT_PROMPT_DIR="$( command cd -P "$( dirname "$SOURCE" )" && pwd )" fi }