Merge branch 'master' of git.blakenorth.net/home/git/dotfiles
This commit is contained in:
commit
780a21b68e
1 changed files with 2 additions and 2 deletions
|
@ -34,13 +34,13 @@ 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)
|
||||
if [ -h ~/todo ]; then
|
||||
if [ -h ~/todo ] && command -v git > /dev/null; then
|
||||
# shellcheck disable=SC2155
|
||||
export DOCS_DIR="$(git -C "$(dirname "$(realpath ~/todo)" 2>&1)" rev-parse --show-toplevel | head -1)"
|
||||
elif [ -d "$HOME/Documents/docs" ]; then
|
||||
export DOCS_DIR="$HOME/Documents/docs/"
|
||||
else
|
||||
echo "Error: couldn't find the documents repo" >&2
|
||||
echo "Error: couldn't find the documents repo" > /dev/null
|
||||
fi
|
||||
|
||||
## Working directory save settings (see things at bottom of zshrc)
|
||||
|
|
Loading…
Add table
Reference in a new issue