diff options
author | katherine <shmibs@shmibbles.me> | 2016-02-02 05:55:28 -0700 |
---|---|---|
committer | katherine <shmibs@shmibbles.me> | 2016-02-02 05:55:28 -0700 |
commit | 2ece2a2987dcbb28283f2337c466f755cdb9c007 (patch) | |
tree | 93fcd74f106b3b0c083fb13e53d512e34aca75d8 /.zshrc-freebsd | |
parent | 8262c40af6678c9737c1c3874c8f813597c0395a (diff) | |
download | dotfiles-2ece2a2987dcbb28283f2337c466f755cdb9c007.tar.gz |
local function variables
i feel dumb
Diffstat (limited to '.zshrc-freebsd')
-rw-r--r-- | .zshrc-freebsd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/.zshrc-freebsd b/.zshrc-freebsd index 0525972..04cc950 100644 --- a/.zshrc-freebsd +++ b/.zshrc-freebsd @@ -16,9 +16,9 @@ export PAGER="less -R" # bits to human readable value b2h() { - suffixes=( 'B' 'K' 'M' 'G' 'T' 'P' 'E' 'Z' 'Y' ) - sindex=1 - val=$1 + local suffixes=( 'B' 'K' 'M' 'G' 'T' 'P' 'E' 'Z' 'Y' ) + local sindex=1 + local val=$1 [[ -z $(echo $1 | grep "^[0-9]*$") ]] && read val while [[ $(echo $val / 1024 | bc) -ne 0 ]]; do |