aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-06-06 12:52:17 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-06-06 12:52:17 +0300
commit02b86416ec5fa07589fac5427f21e1d281a2aec1 (patch)
tree4f01c0ea3409259834e3101ced81146a8ae421d3 /internal/p10k.zsh
parente028cf5c90f89cd8cb5c353ba8099da6c36dfb8a (diff)
don't read /proc/loadavg if it's unreadable
Diffstat (limited to 'internal/p10k.zsh')
-rwxr-xr-xinternal/p10k.zsh1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 34be6240..dbd17684 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -1018,6 +1018,7 @@ prompt_load() {
load=${${(A)=load}[bucket+1]//,/.}
;;
*)
+ [[ -r /proc/loadavg ]] || return
_p9k_read_file /proc/loadavg || return
load=${${(A)=_P9K_RETVAL}[bucket]//,/.}
;;