Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
0f683670
Commit
0f683670
authored
Dec 31, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(CLI): properly get zsh command in `omz update` (#9558)
Zsh versions older than 5.3 don't have ZSH_ARGZERO, so use an alternative method to get the zsh command. Fixes #9558
parent
0e7c8131
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
cli.zsh
lib/cli.zsh
+3
-1
No files found.
lib/cli.zsh
View file @
0f683670
...
@@ -391,7 +391,9 @@ function _omz::update {
...
@@ -391,7 +391,9 @@ function _omz::update {
# Restart the zsh session
# Restart the zsh session
if
[[
$ret
-eq
0
&&
"
$1
"
!=
--unattended
]]
;
then
if
[[
$ret
-eq
0
&&
"
$1
"
!=
--unattended
]]
;
then
# Old zsh versions don't have ZSH_ARGZERO
local
zsh
=
"
${
ZSH_ARGZERO
:-${
functrace
[-1]%
:
*
}}
"
# Check whether to run a login shell
# Check whether to run a login shell
[[
"
$
ZSH_ARGZERO
"
=
-
*
]]
&&
exec
-l
"
${
ZSH_ARGZERO
#-
}
"
||
exec
"
$ZSH_ARGZERO
"
[[
"
$
zsh
"
=
-
*
||
-o
login
]]
&&
exec
-l
"
${
zsh
#-
}
"
||
exec
"
$zsh
"
fi
fi
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment