Update neofetch

This commit is contained in:
Zhang Boyu 2019-10-19 16:11:59 +08:00 committed by GitHub
parent 3b3c28cbe6
commit 6758bfb765
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -1210,6 +1210,12 @@ get_kernel() {
return return
} }
# In Windows 'uname -r' under MSYS returns a "virtual" kernel version, so use wmic
[[ "$os" == Windows ]] && {
kernel_version=$(wmic os get Version)
kernel_version="${kernel_version/Version}"
}
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" ;;