aboutsummaryrefslogtreecommitdiffstats
path: root/.zshrc-freebsd
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2016-02-02 05:55:28 -0700
committerkatherine <shmibs@shmibbles.me>2016-02-02 05:55:28 -0700
commit2ece2a2987dcbb28283f2337c466f755cdb9c007 (patch)
tree93fcd74f106b3b0c083fb13e53d512e34aca75d8 /.zshrc-freebsd
parent8262c40af6678c9737c1c3874c8f813597c0395a (diff)
downloaddotfiles-2ece2a2987dcbb28283f2337c466f755cdb9c007.tar.gz
local function variables
i feel dumb
Diffstat (limited to '.zshrc-freebsd')
-rw-r--r--.zshrc-freebsd6
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