Skip to content

Commit

Permalink
Also process global aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella committed Apr 2, 2023
1 parent 5dd88ef commit f7dcdae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oh-my-zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ _omz_source() {
zstyle -T ":omz:${context}" aliases || disabled_aliases=1

# Back up aliases prior to sourcing
local -A aliases_pre
local -A aliases_pre galiases_pre
if (( disabled_aliases )); then
aliases_pre=("${(@kv)aliases}")
galiases_pre=("${(@kv)galiases}")
fi

# Source file from $ZSH_CUSTOM if it exists, otherwise from $ZSH
Expand All @@ -174,6 +175,7 @@ _omz_source() {
# Restore previous aliases if necessary
if (( disabled_aliases )); then
aliases=("${(@kv)aliases_pre}")
galiases=("${(@kv)galiases_pre}")
fi
}

Expand Down

0 comments on commit f7dcdae

Please sign in to comment.