Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
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
b28db6b4
Commit
b28db6b4
authored
Oct 14, 2015
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4475 from apjanke/diagdump-5.1-fix
diagnostics: fix for reserved-word changes in zsh 5.1
parents
30d7a665
d15521d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
6 deletions
+24
-6
diagnostics.zsh
lib/diagnostics.zsh
+24
-6
No files found.
lib/diagnostics.zsh
View file @
b28db6b4
...
...
@@ -52,6 +52,9 @@
# * Consider whether to move default output file location to TMPDIR. More robust
# but less user friendly.
#
autoload
-Uz
is-at-least
function
omz_diagnostic_dump
()
{
emulate
-L
zsh
...
...
@@ -247,7 +250,7 @@ function _omz_diag_dump_one_big_text() {
function
_omz_diag_dump_check_core_commands
()
{
builtin echo
"Core command check:"
local
redefined name builtins externals
local
redefined name builtins externals
reserved_words
redefined
=()
# All the zsh non-module builtin commands
# These are taken from the zsh reference manual for 5.0.2
...
...
@@ -255,17 +258,32 @@ function _omz_diag_dump_check_core_commands() {
# (For back-compatibility, if any of these are newish, they should be removed,
# or at least made conditional on the version of the current running zsh.)
# "history" is also excluded because OMZ is known to redefine that
reserved_words
=(
do done esac then elif else fi for case
if while function
repeat
time
until select
coproc nocorrect foreach end
'!'
'[['
'{'
'}'
)
builtins
=(
alias
autoload
bg
bindkey
break builtin
bye
cd
chdir
command
comparguments compcall compctl compdescribe compfiles compgroups compquote comptags
comptry compvalues
continue
d
eclare d
irs
disable
disown echo
echotc echoti emulate
enable eval exec exit
export false fc fg
float
functions getln
getopts hash
integer
jobs kill let
limit
local
log
logout
noglob
popd
print
printf
pushd
pushln
pwd
r
read re
adonly
re
hash
return
sched
set
setopt
shift
source suspend test times trap true
ttyctl
type
typeset
ulimit umask unalias
comptry compvalues
continue
dirs
disable
disown echo
echotc echoti emulate
enable eval exec exit
false fc fg
functions getln
getopts hash
jobs kill let
limit
log
logout
noglob
popd
print
printf
pushd
pushln
pwd
r
read
rehash
return
sched
set
setopt
shift
source suspend test times trap true
ttyctl
type ulimit umask unalias
unfunction unhash unlimit
unset
unsetopt vared
wait
whence where which zcompile
zle zmodload zparseopts zregexparse zstyle
)
if
is-at-least 5.1
;
then
reserved_word+
=(
declare export
integer float
local readonly typeset
)
else
builtins+
=(
declare export
integer float
local readonly typeset
)
fi
builtins_fatal
=(
builtin command local
)
externals
=(
zsh
)
for
name
in
$reserved_words
;
do
if
[[
$(
builtin
whence
-w
$name
)
!=
"
$name
: reserved"
]]
;
then
builtin echo
"reserved word '
$name
' has been redefined"
builtin
which
$name
redefined+
=
$name
fi
done
for
name
in
$builtins
;
do
if
[[
$(
builtin
whence
-w
$name
)
!=
"
$name
: builtin"
]]
;
then
builtin echo
"builtin '
$name
' has been redefined"
...
...
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