1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02:00

fix ram segment on wsl

This commit is contained in:
romkatv 2020-01-19 21:24:11 +01:00
parent c79108ff0a
commit f1e9d9ade7

View File

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