mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-11 00:10:08 +00:00
fix(cli): make sure to run zsh
command if an alias exists (#9737)
Fixes #9737
This commit is contained in:
parent
8e7c33bf15
commit
f64cabc780
1 changed files with 5 additions and 5 deletions
10
lib/cli.zsh
10
lib/cli.zsh
|
@ -289,7 +289,7 @@ multi == 1 && length(\$0) > 0 {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exit if the new .zshrc file has syntax errors
|
# Exit if the new .zshrc file has syntax errors
|
||||||
if ! zsh -n "$zdot/.zshrc"; then
|
if ! command zsh -n "$zdot/.zshrc"; then
|
||||||
_omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..."
|
_omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..."
|
||||||
command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new"
|
command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new"
|
||||||
command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc"
|
command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc"
|
||||||
|
@ -365,7 +365,7 @@ multi == 1 && /^[^#]*\)/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exit if the new .zshrc file has syntax errors
|
# Exit if the new .zshrc file has syntax errors
|
||||||
if ! zsh -n "$zdot/.zshrc"; then
|
if ! command zsh -n "$zdot/.zshrc"; then
|
||||||
_omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..."
|
_omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..."
|
||||||
command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new"
|
command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new"
|
||||||
command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc"
|
command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc"
|
||||||
|
@ -721,7 +721,7 @@ EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# Exit if the new .zshrc file has syntax errors
|
# Exit if the new .zshrc file has syntax errors
|
||||||
if ! zsh -n "$zdot/.zshrc"; then
|
if ! command zsh -n "$zdot/.zshrc"; then
|
||||||
_omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..."
|
_omz::log error "broken syntax in '"${zdot/#$HOME/\~}/.zshrc"'. Rolling back changes..."
|
||||||
command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new"
|
command mv -f "$zdot/.zshrc" "$zdot/.zshrc.new"
|
||||||
command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc"
|
command mv -f "$zdot/.zshrc.bck" "$zdot/.zshrc"
|
||||||
|
@ -765,9 +765,9 @@ function _omz::update {
|
||||||
|
|
||||||
# Run update script
|
# Run update script
|
||||||
if [[ "$1" != --unattended ]]; then
|
if [[ "$1" != --unattended ]]; then
|
||||||
ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive || return $?
|
ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" --interactive || return $?
|
||||||
else
|
else
|
||||||
ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" || return $?
|
ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" || return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update last updated file
|
# Update last updated file
|
||||||
|
|
Loading…
Reference in a new issue