diff --git a/.zshrc b/.zshrc index 05ef2cb..e7bd779 100644 --- a/.zshrc +++ b/.zshrc @@ -23,7 +23,7 @@ export ZINIT_HOME_DIR="${XDG_DATA_HOME:-$HOME/.local}/share/zinit" # Set documents directory (auto set to the repo the file ~/todo points to is in) - export DOCS_DIR="$(git -C "$(dirname "$(realpath ~/todo)")" rev-parse --show-toplevel | head -1)" + [ -h ~/todo ] && export DOCS_DIR="$(git -C "$(dirname "$(realpath ~/todo)" 2>&1)" rev-parse --show-toplevel | head -1)" # Don't add extra space to the right side of the prompt ZLE_RPROMPT_INDENT=0