fix XDG_CONFIG_HOME naming

This commit is contained in:
Marty Oehme 2019-03-12 15:47:07 +01:00
parent 283f86a6ba
commit 4eb00e6915
4 changed files with 6 additions and 9 deletions

6
.zshrc
View file

@ -29,7 +29,7 @@ print_dbg() {
# Clone zgen if you haven't already
check_zgen_installation() {
if [[ -z "$ZGEN_PARENT_DIR" ]]; then
ZGEN_PARENT_DIR=${${XDG_CONFIG_DIR}:="$HOME/.config/"}
ZGEN_PARENT_DIR=${${XDG_CONFIG_HOME}:="$HOME/.config/"}
ZGEN_DIR="$ZGEN_PARENT_DIR/zgen"
fi
if [[ ! -f $ZGEN_DIR/zgen.zsh ]]; then
@ -90,9 +90,9 @@ load_config_files() {
# Set ZSH_CONFIG_DIR to default to ~/.config/zsh, or let user override
# Exit early if no configuration directory has been found
if [ ! -d ${ZSH_CONFIG_DIR:="${XDG_CONFIG_DIR:-$HOME/.config}/zsh"} ]; then
if [ ! -d ${ZSH_CONFIG_DIR:="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"} ]; then
# If the user explicitly overrode the path give him an error
if [ ! $ZSH_CONFIG_DIR = "${XDG_CONFIG_DIR:-$HOME/.config/}/zsh" ]; then
if [ ! $ZSH_CONFIG_DIR = "${XDG_CONFIG_HOME:-$HOME/.config/}/zsh" ]; then
printf "\$ZSH_CONFIG_DIR=$ZSH_CONFIG_DIR/ does not exist.\n"
fi
PS1="$HOME $ "