Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
82c1288c
Commit
82c1288c
authored
Jun 06, 2015
by
Andrew Janke
Browse files
Include some bash rc files; improve formatting; more version info
parent
ea6adc5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/diagnostics.zsh
View file @
82c1288c
...
@@ -104,12 +104,12 @@ function _omz_diag_dump_one_big_text() {
...
@@ -104,12 +104,12 @@ function _omz_diag_dump_one_big_text() {
command date
command date
command uname
-a
command uname
-a
builtin echo
OSTYPE
=
$OSTYPE
builtin echo
OSTYPE
=
$OSTYPE
command
zsh
--version
builtin echo
ZSH_VERSION
=
$ZSH_VERSION
builtin echo
User:
$USER
builtin echo
User:
$USER
builtin echo
builtin echo
# Installed programs
# Installed programs
programs
=(
sh zsh ksh bash
sed cat grep
find git posh
)
programs
=(
sh zsh ksh bash
sed cat grep
ls
find git posh
)
for
program
in
$programs
;
do
for
program
in
$programs
;
do
local
md5_str
=
""
md5
=
""
link_str
=
""
extra_str
=
""
local
md5_str
=
""
md5
=
""
link_str
=
""
extra_str
=
""
progfile
=
$(
builtin
which
$program
)
progfile
=
$(
builtin
which
$program
)
...
@@ -119,7 +119,7 @@ function _omz_diag_dump_one_big_text() {
...
@@ -119,7 +119,7 @@ function _omz_diag_dump_one_big_text() {
extra_str+
=
"
$(
md5
-q
$progfile
)
"
extra_str+
=
"
$(
md5
-q
$progfile
)
"
fi
fi
if
[[
-h
"
$progfile
"
]]
;
then
if
[[
-h
"
$progfile
"
]]
;
then
extra_str+
=
" ( ->
${
file
:A
}
)"
extra_str+
=
" ( ->
${
prog
file
:A
}
)"
fi
fi
fi
fi
builtin printf
'%-9s %-20s %s\n'
"
$program
is"
"
$progfile
"
"
$extra_str
"
builtin printf
'%-9s %-20s %s\n'
"
$program
is"
"
$progfile
"
"
$extra_str
"
...
@@ -128,8 +128,9 @@ function _omz_diag_dump_one_big_text() {
...
@@ -128,8 +128,9 @@ function _omz_diag_dump_one_big_text() {
fi
fi
done
done
builtin echo
builtin echo
builtin echo
Versions:
builtin echo
Command
Versions:
builtin echo
"zsh:
$(
zsh
--version
)
"
builtin echo
"zsh:
$(
zsh
--version
)
"
builtin echo
"this zsh session:
$ZSH_VERSION
"
builtin echo
"bash:
$(
bash
--version
|
command grep
bash
)
"
builtin echo
"bash:
$(
bash
--version
|
command grep
bash
)
"
builtin echo
"git:
$(
git
--version
)
"
builtin echo
"git:
$(
git
--version
)
"
builtin echo
"grep:
$(
grep
--version
)
"
builtin echo
"grep:
$(
grep
--version
)
"
...
@@ -199,8 +200,12 @@ function _omz_diag_dump_one_big_text() {
...
@@ -199,8 +200,12 @@ function _omz_diag_dump_one_big_text() {
local
zdotdir
=
${
ZDOTDIR
:-
$HOME
}
local
zdotdir
=
${
ZDOTDIR
:-
$HOME
}
builtin echo
"Zsh configuration files:"
builtin echo
"Zsh configuration files:"
local
cfgfile cfgfiles
local
cfgfile cfgfiles
# Some files for bash that zsh does not use are intentionally included
# to help with diagnosing behavior differences between bash and zsh
cfgfiles
=(
/etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout
cfgfiles
=(
/etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout
$zdotdir
/.zshenv
$zdotdir
/.zprofile
$zdotdir
/.zshrc
$zdotdir
/.zlogin
$zdotdir
/.zlogout
)
$zdotdir
/.zshenv
$zdotdir
/.zprofile
$zdotdir
/.zshrc
$zdotdir
/.zlogin
$zdotdir
/.zlogout
~/.zsh-pre-oh-my-zsh
/etc/bashrc /etc/profile ~/.bashrc ~/.profile ~/.bash_profile ~/.bash_logout
)
command ls
-lad
$cfgfiles
2>&1
command ls
-lad
$cfgfiles
2>&1
builtin echo
builtin echo
if
[[
$verbose
-ge
1
]]
;
then
if
[[
$verbose
-ge
1
]]
;
then
...
@@ -208,6 +213,7 @@ function _omz_diag_dump_one_big_text() {
...
@@ -208,6 +213,7 @@ function _omz_diag_dump_one_big_text() {
_omz_diag_dump_echo_file_w_header
$cfgfile
_omz_diag_dump_echo_file_w_header
$cfgfile
done
done
fi
fi
builtin echo
builtin echo
"Zsh compdump files:"
builtin echo
"Zsh compdump files:"
local
dumpfile dumpfiles
local
dumpfile dumpfiles
command ls
-lad
$zdotdir
/.zcompdump
*
command ls
-lad
$zdotdir
/.zcompdump
*
...
@@ -274,6 +280,12 @@ function _omz_diag_dump_echo_file_w_header() {
...
@@ -274,6 +280,12 @@ function _omz_diag_dump_echo_file_w_header() {
command cat
$file
command cat
$file
builtin echo
"========== end
$file
=========="
builtin echo
"========== end
$file
=========="
builtin echo
builtin echo
elif
[[
-d
$file
]]
;
then
builtin echo
"File '
$file
' is a directory"
elif
[[
!
-e
$file
]]
;
then
builtin echo
"File '
$file
' does not exist"
else
command ls
-lad
"
$file
"
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