mirror of
https://github.com/jakejarvis/dotfiles.git
synced 2025-04-25 15:35:21 -04:00
28 lines
725 B
Bash
28 lines
725 B
Bash
#!/usr/bin/env zsh
|
|
|
|
# set DOTFILES_DEBUG to trace startup times (1/2)
|
|
[[ "$DOTFILES_DEBUG" != "1" ]] || zmodload zsh/zprof
|
|
|
|
# path to this directory:
|
|
export ZSH_CUSTOM=~/.dotfiles/zsh
|
|
|
|
# load .zsh files from the above dir in this order:
|
|
for _dotzsh in "$ZSH_CUSTOM"/custom/{common,env,path,aliases,functions,plugins}.zsh; do
|
|
if [[ -f "$_dotzsh" ]]; then
|
|
source "$_dotzsh"
|
|
fi
|
|
done
|
|
unset _dotzsh
|
|
|
|
# macos.zsh has aliases, functions, etc specific to macOS:
|
|
if [[ "$OSTYPE" = darwin* ]] && [[ -f "$ZSH_CUSTOM"/custom/macos.zsh ]]; then
|
|
source "$ZSH_CUSTOM"/custom/macos.zsh
|
|
fi
|
|
|
|
if [[ -f ~/.zshrc.local ]]; then
|
|
source ~/.zshrc.local
|
|
fi
|
|
|
|
# uncomment to debug startup time (2/2)
|
|
[[ "$DOTFILES_DEBUG" != "1" ]] || zprof
|