fix ram segment on wsl

pull/445/head
romkatv 5 years ago
parent c79108ff0a
commit f1e9d9ade7

@ -2249,8 +2249,8 @@ _p9k_prompt_ram_async() {
*) *)
[[ -r /proc/meminfo ]] || return [[ -r /proc/meminfo ]] || return
local stat && stat="$(</proc/meminfo)" || return local stat && stat="$(</proc/meminfo)" || return
[[ $stat == (#b)*'MemAvailable:'[[:space:]]#(<->)* ]] || return [[ $stat == (#b)*(MemAvailable:|MemFree:)[[:space:]]#(<->)* ]] || return
free_bytes=$(( $match[1] * 1024 )) free_bytes=$(( $match[2] * 1024 ))
;; ;;
esac esac

Loading…
Cancel
Save