diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2022-01-17 17:35:20 +0300 |
---|---|---|
committer | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2022-01-17 17:35:20 +0300 |
commit | 3d994b033b934b6f5d4e021b6e0b4155bf13542b (patch) | |
tree | 306a2c0945c2258c71907877b1c9a894a4a937cd /internal/p10k.zsh | |
parent | 0f8a77d47df744038d7d841b7321b55b6b2db638 (diff) |
work around bugs in WSL where it reports more swap being used than the total available (#1724)
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 802cdf95..fed131b5 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -3399,6 +3399,8 @@ _p9k_prompt_swap_async() { (( used_bytes *= 1024 )) fi + (( used_bytes >= 0 || (used_bytes = 0) )) + _p9k_human_readable_bytes $used_bytes [[ $_p9k__ret != $_p9k__swap_used ]] || return _p9k__swap_used=$_p9k__ret |