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
|
@ -1217,6 +1217,13 @@ get_kernel() {
|
||||||
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 ;;
|
||||||
off) kernel="$kernel_name $kernel_version" ;;
|
off) kernel="$kernel_name $kernel_version" ;;
|
||||||
|
|
Loading…
Reference in a new issue