mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 04:46:41 +00:00
chore(zshrc): minor re-orders of a few sections
This commit is contained in:
68
zshrc
68
zshrc
@@ -9,6 +9,12 @@ if [[ "$OSTYPE" == "darwin"* ]] && [ -f "/etc/zshrc" ]; then
|
||||
source "/etc/zshrc"
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# Helper Functions
|
||||
# ==============================================================================
|
||||
|
||||
source "$DOTZSH/zshrc.funcs.zsh"
|
||||
|
||||
# ==============================================================================
|
||||
# Zinit
|
||||
# ==============================================================================
|
||||
@@ -36,6 +42,21 @@ source "${ZINIT[BIN_DIR]}/zinit.zsh"
|
||||
# from the system clipboard.
|
||||
zinit for @OMZ::lib/clipboard.zsh
|
||||
|
||||
# ==============================================================================
|
||||
# Environment
|
||||
# ==============================================================================
|
||||
|
||||
# Ensure mise shims directory is in PATH so that installed tools are immediately
|
||||
# available for use within shell initialization. We activate mise normally right
|
||||
# at end which replaces the shims in PATH with a shell hook that updates PATH as
|
||||
# needed.
|
||||
path_prepend "$MISE_HOME/shims"
|
||||
|
||||
# If available, make sure to load direnv shell hook before mise.
|
||||
if command-exists direnv; then
|
||||
cached-eval "$(command-path direnv)" direnv hook zsh
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# History
|
||||
# ==============================================================================
|
||||
@@ -203,29 +224,10 @@ autoload -z edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey "^X^E" edit-command-line
|
||||
|
||||
# ==============================================================================
|
||||
# Helper Functions
|
||||
# ==============================================================================
|
||||
|
||||
source "$DOTZSH/zshrc.funcs.zsh"
|
||||
|
||||
# ==============================================================================
|
||||
# Private Dotfiles
|
||||
# ==============================================================================
|
||||
|
||||
if [ -f "$DOTPFILES/zshrc" ]; then
|
||||
source "$DOTPFILES/zshrc"
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# Environment and Tool Managers
|
||||
# ==============================================================================
|
||||
|
||||
# If available, make sure to load direnv shell hook before mise.
|
||||
if command-exists direnv; then
|
||||
cached-eval "$(command-path direnv)" direnv hook zsh
|
||||
fi
|
||||
|
||||
MISE_HOME="$HOME/.local/share/mise"
|
||||
MISE_ZSH_INIT="$MISE_HOME/shell/init.zsh"
|
||||
export MISE_INSTALL_PATH="$MISE_HOME/bin/mise"
|
||||
@@ -237,12 +239,6 @@ fi
|
||||
|
||||
if command-exists mise; then
|
||||
alias mi="mise"
|
||||
|
||||
# Ensure shims directory is in PATH so that install tools are immediately
|
||||
# available for use within shell initialization. We activate mise normally
|
||||
# right at end which replaces the shims in PATH with a shell hook that updates
|
||||
# PATH as needed.
|
||||
path_prepend "$MISE_HOME/shims"
|
||||
setup-completions mise "$MISE_INSTALL_PATH" mise completions zsh
|
||||
fi
|
||||
|
||||
@@ -263,6 +259,14 @@ else
|
||||
echo " install with: mise install starship" >&2
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# Private Dotfiles
|
||||
# ==============================================================================
|
||||
|
||||
if [ -f "$DOTPFILES/zshrc" ]; then
|
||||
source "$DOTPFILES/zshrc"
|
||||
fi
|
||||
|
||||
# ==============================================================================
|
||||
# Tool specific setup
|
||||
# ==============================================================================
|
||||
@@ -312,6 +316,13 @@ unsetopt share_history
|
||||
# Disable attempted correction of commands (is wrong 98% of the time).
|
||||
unsetopt correctall
|
||||
|
||||
# ==============================================================================
|
||||
# Prepare interactive environment
|
||||
# ==============================================================================
|
||||
|
||||
# Activate mise properly for interactive use not using shims.
|
||||
eval "$("$MISE_INSTALL_PATH" activate zsh)"
|
||||
|
||||
# ==============================================================================
|
||||
# Local Overrides
|
||||
# ==============================================================================
|
||||
@@ -321,10 +332,3 @@ if [ -f "$HOME/.zshrc.local" ]; then
|
||||
fi
|
||||
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
|
||||
# ==============================================================================
|
||||
# Prepare interactive environment
|
||||
# ==============================================================================
|
||||
|
||||
# Activate mise properly for interactive use not using shims.
|
||||
eval "$("$MISE_INSTALL_PATH" activate zsh)"
|
||||
|
||||
Reference in New Issue
Block a user