fix: source omz externally

This commit is contained in:
Price Hiller 2022-07-31 01:30:08 -05:00
parent c31e84606b
commit 213c587406
2 changed files with 42 additions and 49 deletions

View File

@ -4,6 +4,48 @@ configure() {
autoload -U +X bashcompinit && bashcompinit
}
init-omz() {
# This has to break spec because omz will source EVERYTHING inside of the
# omz directory :(
### Autojump ###
source "${HOME}/.local/share/autojump/etc/profile.d/autojump.sh"
plugins=(
git
zsh-autosuggestions
zsh-completions
zsh-syntax-highlighting
colored-man-pages
pip
extract
fzf-tab
autojump
aws
docker
docker-compose
nmap
npm
python
zsh-vi-mode
zsh-kitty
rust
dotnet
)
if [[ "${OSTYPE}" = "darwin"* ]]; then
plugins +=(
macos
)
fi
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/omz"
export ZSH="${HOME}/.local/share/omz"
export ZSH_CUSTOM="${wkdir}/"
export OMZ_INIT_RAN=true
source "${ZSH}/oh-my-zsh.sh"
}
init() {
local wkdir="${BASE_ZSH_CONFIG_DIR}/config"
source "${wkdir}/themes/init.zsh"

View File

@ -1,49 +0,0 @@
OMZ_DIRS="${BASE_ZSH_CONFIG_DIR}/config/omz"
configure() {
### Autojump ###
source "${HOME}/.local/share/autojump/etc/profile.d/autojump.sh"
export plugins=(
git
zsh-autosuggestions
zsh-completions
zsh-syntax-highlighting
colored-man-pages
pip
extract
fzf-tab
autojump
aws
docker
docker-compose
nmap
npm
python
zsh-vi-mode
zsh-kitty
rust
dotnet
)
if [[ "${OSTYPE}" = "darwin"* ]]; then
plugins +=(
macos
)
fi
}
init() {
if ! [[ OMZ_INIT_RAN = true ]]; then
local wkdir="${BASE_ZSH_CONFIG_DIR}/config/omz"
export ZSH="${HOME}/.local/share/omz"
export ZSH_CUSTOM="${wkdir}/"
export OMZ_INIT_RAN=true
source "${ZSH}/oh-my-zsh.sh"
fi
configure
}
init