Merge pull request #1335 from Zhboyu-BUAA/master
Fix a irrational respond about Kernel Version in Windows
This commit is contained in:
commit
ed02764ec0
1 changed files with 7 additions and 0 deletions
7
neofetch
7
neofetch
|
@ -1216,6 +1216,13 @@ get_kernel() {
|
||||||
kernel=$(uname -v)
|
kernel=$(uname -v)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# In Windows 'uname' may return the info of GNUenv thus use wmic for OS kernel
|
||||||
|
[[ "$os" == Windows ]] && {
|
||||||
|
kernel=$(wmic os get Version)
|
||||||
|
kernel="${kernel/Version}"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
case $kernel_shorthand in
|
case $kernel_shorthand in
|
||||||
on) kernel=$kernel_version ;;
|
on) kernel=$kernel_version ;;
|
||||||
|
|
Loading…
Reference in a new issue