zsh: fix for having no docs repo or todo symlink

This commit is contained in:
PowerUser64 2022-01-09 20:54:51 -08:00
parent 68259adac0
commit 126325d598

2
.zshrc
View file

@ -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