Shorten ZDOTDIR setting

This commit is contained in:
tastytea 2022-03-18 15:21:50 +01:00
parent ff7042dd36
commit f7d26735e7
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -4,17 +4,10 @@ function() # Keep local variables in here.
############################## Paths ###########################################
export PATH="${HOME}/bin:${HOME}/.local/bin:${PATH}"
if [[ -z "${ZDOTDIR}" ]]; then
if [[ -n "${XDG_CONFIG_HOME}" ]]; then
ZDOTDIR="${XDG_CONFIG_HOME}/zsh"
else
ZDOTDIR="${HOME}/.config/zsh"
fi
export ZDOTDIR
fi
export ZDOTDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/zsh"
export HISTFILE="${ZDOTDIR}/.zsh_history"
export ZSH_CACHE_DIR="${XDG_CACHE_HOME:-${HOME}/.cache}/zsh"
mkdir -p ${ZSH_CACHE_DIR}
mkdir -p "${ZSH_CACHE_DIR}"
if [[ -d "${HOME}/.local/share/man/" ]]; then
export MANPATH="${MANPATH}:${HOME}/.local/share/man"