From 6758bfb7656f7e16a7b7fd4b88b16040c05c4812 Mon Sep 17 00:00:00 2001 From: Zhang Boyu <34395339+Zhboyu-BUAA@users.noreply.github.com> Date: Sat, 19 Oct 2019 16:11:59 +0800 Subject: [PATCH] Update neofetch --- neofetch | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neofetch b/neofetch index 4274be07..1bbe09cd 100755 --- a/neofetch +++ b/neofetch @@ -1210,6 +1210,12 @@ get_kernel() { 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 "on") kernel="$kernel_version" ;; "off") kernel="$kernel_name $kernel_version" ;;