From 8c6561ea0ef3b86868c2d1a4ef3f1681cc66a501 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 30 Jul 2022 19:11:38 -0500 Subject: [PATCH] fix: use correct directory pathing --- .config/zsh/config/completions/init.zsh | 3 ++- .config/zsh/config/init.zsh | 11 ++++++----- .config/zsh/config/omz/init.zsh | 6 +++--- .config/zsh/config/profile/init.zsh | 9 ++++++--- .config/zsh/config/profile/profile/env.zsh | 3 +++ .config/zsh/config/themes/init.zsh | 6 ++++-- .config/zsh/zsh | 2 +- 7 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.config/zsh/config/completions/init.zsh b/.config/zsh/config/completions/init.zsh index e0b0c99..b86aa4f 100644 --- a/.config/zsh/config/completions/init.zsh +++ b/.config/zsh/config/completions/init.zsh @@ -1,7 +1,8 @@ #!/usr/bin/env zsh init() { - FPATH="${FPATH}:${BASE_ZSH_CONFIG_DIR}/config/completions/completions" + local wkdir="${BASE_ZSH_CONFIG_DIR}/config/completions" + FPATH="${FPATH}:${wkdir}/completions" autoload -Uz compinit compinit diff --git a/.config/zsh/config/init.zsh b/.config/zsh/config/init.zsh index 58c532d..983fbd3 100644 --- a/.config/zsh/config/init.zsh +++ b/.config/zsh/config/init.zsh @@ -5,11 +5,12 @@ configure() { } init() { - source ./themes/init.zsh - source ./omz/init.zsh - source ./programs/init.zsh - source ./profile/init.zsh - source ./style/init.zsh + local wkdir="${BASE_ZSH_CONFIG_DIR}/config" + source "${wkdir}/themes/init.zsh" + source "${wkdir}/omz/init.zsh" + source "${wkdir}/programs/init.zsh" + source "${wkdir}/profile/init.zsh" + source "${wkdir}/style/init.zsh" configure } diff --git a/.config/zsh/config/omz/init.zsh b/.config/zsh/config/omz/init.zsh index 9d687be..b09bcd8 100644 --- a/.config/zsh/config/omz/init.zsh +++ b/.config/zsh/config/omz/init.zsh @@ -30,12 +30,12 @@ configure() { fi export plugins - export ZSH_AUTOSUGGEST_STRATEGY=(history completion) } init() { - export ZSH="${OMZ_DIRS}/omz/omz/.oh-my-zsh" - export ZSH_CUSTOM="${OMZ_DIRS}/" + local wkdir="${BASE_ZSH_CONFIG_DIR}/config/omz" + export ZSH="${wkdir}/omz/.oh-my-zsh" + export ZSH_CUSTOM="${wkdir}/" configure source "${ZSH}/oh-my-zsh.sh" diff --git a/.config/zsh/config/profile/init.zsh b/.config/zsh/config/profile/init.zsh index f434ef3..f0f6323 100644 --- a/.config/zsh/config/profile/init.zsh +++ b/.config/zsh/config/profile/init.zsh @@ -5,9 +5,12 @@ configure() { } init() { - source ./profile/options.zsh - source ./profile/env.zsh - source ./profile/pathing.zsh + + local wkdir="${BASE_ZSH_CONFIG_DIR}/config/profile" + source "${wkdir}/profile/options.zsh" + source "${wkdir}/profile/env.zsh" + source "${wkdir}/profile/functions.zsh" + source "${wkdir}/profile/aliases.zsh" configure } diff --git a/.config/zsh/config/profile/profile/env.zsh b/.config/zsh/config/profile/profile/env.zsh index 92d45c3..57b802f 100644 --- a/.config/zsh/config/profile/profile/env.zsh +++ b/.config/zsh/config/profile/profile/env.zsh @@ -48,6 +48,9 @@ if [[ "$OSTYPE" = "darwin"* ]]; then # Zsh FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}" _import_custom_bash_completions + + autoload -Uz compinit + compinit fi fi diff --git a/.config/zsh/config/themes/init.zsh b/.config/zsh/config/themes/init.zsh index 10444a5..5357180 100644 --- a/.config/zsh/config/themes/init.zsh +++ b/.config/zsh/config/themes/init.zsh @@ -10,11 +10,13 @@ # omz. configure() { - source ./config.zsh + local wkdir="${BASE_ZSH_CONFIG_DIR}/config/themes" + source "${wkdir}/config.zsh" } init() { - source ./powerlevel10k/powerlevel10k.zsh-theme + local wkdir="${BASE_ZSH_CONFIG_DIR}/config/themes" + source "${wkdir}/powerlevel10k/powerlevel10k.zsh-theme" } init diff --git a/.config/zsh/zsh b/.config/zsh/zsh index 56310fd..22b4b49 100644 --- a/.config/zsh/zsh +++ b/.config/zsh/zsh @@ -1,4 +1,4 @@ #!/usr/bin/env zsh export BASE_ZSH_CONFIG_DIR="$(dirname -- "$( readlink -f -- "${0}" )")" -source ./config/init.zsh +source "${BASE_ZSH_CONFIG_DIR}/config/init.zsh"