From faf767244b43c7ee3d1c5c8392ba5e81b31713fc Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 13 Dec 2023 10:50:11 +0000 Subject: [PATCH] Re-orders imports, so aliases are set after Brew is added to path --- config/zsh/.zshrc | 56 ++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 113d1e3..ff3df8a 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -17,33 +17,6 @@ utils_dir="${XDG_CONFIG_HOME}/utils" # If not running interactively, don't do anything [[ $- != *i* ]] && return -# Source all ZSH config files (if present) -if [[ -d $zsh_dir ]]; then - # Import alias files - source ${zsh_dir}/aliases/general.zsh - source ${zsh_dir}/aliases/git.zsh - source ${zsh_dir}/aliases/node-js.zsh - source ${zsh_dir}/aliases/rust.zsh - source ${zsh_dir}/aliases/flutter.zsh - source ${zsh_dir}/aliases/alias-tips.zsh - - # Setup Antigen, and import plugins - source ${zsh_dir}/helpers/setup-antigen.zsh - source ${zsh_dir}/helpers/import-plugins.zsh - source ${zsh_dir}/helpers/misc-stuff.zsh - - # Configure ZSH stuff - source ${zsh_dir}/lib/colors.zsh - source ${zsh_dir}/lib/cursor.zsh - source ${zsh_dir}/lib/history.zsh - source ${zsh_dir}/lib/surround.zsh - source ${zsh_dir}/lib/completion.zsh - source ${zsh_dir}/lib/term-title.zsh - source ${zsh_dir}/lib/navigation.zsh - source ${zsh_dir}/lib/expansions.zsh - source ${zsh_dir}/lib/key-bindings.zsh -fi - # Import utility functions if [[ -d $utils_dir ]]; then source ${utils_dir}/transfer.sh @@ -80,6 +53,35 @@ if [ "$(uname -s)" = "Darwin" ]; then fi fi + +# Source all ZSH config files (if present) +if [[ -d $zsh_dir ]]; then + # Import alias files + source ${zsh_dir}/aliases/general.zsh + source ${zsh_dir}/aliases/git.zsh + source ${zsh_dir}/aliases/node-js.zsh + source ${zsh_dir}/aliases/rust.zsh + source ${zsh_dir}/aliases/flutter.zsh + source ${zsh_dir}/aliases/tmux.zsh + source ${zsh_dir}/aliases/alias-tips.zsh + + # Setup Antigen, and import plugins + source ${zsh_dir}/helpers/setup-antigen.zsh + source ${zsh_dir}/helpers/import-plugins.zsh + source ${zsh_dir}/helpers/misc-stuff.zsh + + # Configure ZSH stuff + source ${zsh_dir}/lib/colors.zsh + source ${zsh_dir}/lib/cursor.zsh + source ${zsh_dir}/lib/history.zsh + source ${zsh_dir}/lib/surround.zsh + source ${zsh_dir}/lib/completion.zsh + source ${zsh_dir}/lib/term-title.zsh + source ${zsh_dir}/lib/navigation.zsh + source ${zsh_dir}/lib/expansions.zsh + source ${zsh_dir}/lib/key-bindings.zsh +fi + # If using Pyenv, import the shell integration if availible if [[ -d "$PYENV_ROOT" ]]; then command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"