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
bca720fa
Commit
bca720fa
authored
Jul 10, 2015
by
Andrew Janke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diagnostics: include detailed OS version info if possible
parent
9813ff5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
diagnostics.zsh
lib/diagnostics.zsh
+28
-0
No files found.
lib/diagnostics.zsh
View file @
bca720fa
...
@@ -55,6 +55,8 @@
...
@@ -55,6 +55,8 @@
function
omz_diagnostic_dump
()
{
function
omz_diagnostic_dump
()
{
emulate
-L
zsh
emulate
-L
zsh
builtin echo
"Generating diagnostic dump; please be patient..."
local
thisfcn
=
omz_diagnostic_dump
local
thisfcn
=
omz_diagnostic_dump
local
-A
opts
local
-A
opts
local
opt_verbose opt_noverbose opt_outfile
local
opt_verbose opt_noverbose opt_outfile
...
@@ -108,6 +110,8 @@ function _omz_diag_dump_one_big_text() {
...
@@ -108,6 +110,8 @@ function _omz_diag_dump_one_big_text() {
builtin echo
User:
$USER
builtin echo
User:
$USER
builtin echo umask
:
$(
umask
)
builtin echo umask
:
$(
umask
)
builtin echo
builtin echo
_omz_diag_dump_os_specific_version
builtin echo
# Installed programs
# Installed programs
programs
=(
sh zsh ksh bash
sed cat grep ls
find git posh
)
programs
=(
sh zsh ksh bash
sed cat grep ls
find git posh
)
...
@@ -299,4 +303,28 @@ function _omz_diag_dump_echo_file_w_header() {
...
@@ -299,4 +303,28 @@ function _omz_diag_dump_echo_file_w_header() {
fi
fi
}
}
function
_omz_diag_dump_os_specific_version
()
{
local
osname osver version_file version_files
case
"
$OSTYPE
"
in
darwin
*
)
osname
=
$(
command
sw_vers
-productName
)
osver
=
$(
command
sw_vers
-productVersion
)
builtin echo
"OS Version:
$osname
$osver
build
$(
sw_vers
-buildVersion
)
"
;;
cygwin
)
command
systeminfo |
command grep
"^OS Name
\|
^OS Version"
;;
esac
if
builtin
which lsb_release
>
/dev/null
;
then
builtin echo
"OS Release:
$(
command
lsb_release
-s
-d
)
"
fi
version_files
=(
/etc/
*
-release
(
N
)
/etc/
*
-version
(
N
)
/etc/
*
_version
(
N
)
)
for
version_file
in
$version_files
;
do
builtin echo
"
$version_file
:"
command cat
"
$version_file
"
builtin echo
done
}
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