mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-19 14:01:57 +00:00
quote to avoid clashes with global aliases
This commit is contained in:
parent
82bec3a25b
commit
7f3924adf9
1 changed files with 4 additions and 4 deletions
|
@ -1513,10 +1513,10 @@ prompt_swap() {
|
||||||
[[ "$(command sysctl vm.swapusage 2>/dev/null)" =~ "used = ([0-9,.]+)([A-Z]+)" ]] || return
|
[[ "$(command sysctl vm.swapusage 2>/dev/null)" =~ "used = ([0-9,.]+)([A-Z]+)" ]] || return
|
||||||
used_bytes=${match[1]//,/.}
|
used_bytes=${match[1]//,/.}
|
||||||
case ${match[2]} in
|
case ${match[2]} in
|
||||||
K) (( used_bytes *= 1024 ));;
|
'K') (( used_bytes *= 1024 ));;
|
||||||
M) (( used_bytes *= 1048576 ));;
|
'M') (( used_bytes *= 1048576 ));;
|
||||||
G) (( used_bytes *= 1073741824 ));;
|
'G') (( used_bytes *= 1073741824 ));;
|
||||||
T) (( used_bytes *= 1099511627776 ));;
|
'T') (( used_bytes *= 1099511627776 ));;
|
||||||
*) return;;
|
*) return;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue