From 0a74fbbed8b65d399294e856cbfbb40ab2e494a9 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Thu, 6 Jan 2022 21:41:22 -0800 Subject: [PATCH] zsh: fix docs repo not being detected properly --- .zshrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index cdcc491..dd5f949 100644 --- a/.zshrc +++ b/.zshrc @@ -13,8 +13,8 @@ export EDITOR=vi fi - export PATH="$PATH:${XDG_DATA_HOME:-$HOME/.local}/bin:$SHELL_CONFIG_DIR/bin" export SHELL_CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/shell" + export PATH="$PATH:${XDG_DATA_HOME:-$HOME/.local}/bin:$SHELL_CONFIG_DIR/bin" export SYSTEMD_EDITOR="$EDITOR" export LSCOLORS="Gxfxcxdxbxegedabagacad" @@ -22,6 +22,9 @@ 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)" + # Don't add extra space to the right side of the prompt ZLE_RPROMPT_INDENT=0 @@ -66,8 +69,6 @@ alias :q='exit' \ q='exit' \ - alias sc=shellcheck - # rmdir is long alias \ rmd='rmdir' \