From 2ece2a2987dcbb28283f2337c466f755cdb9c007 Mon Sep 17 00:00:00 2001 From: katherine Date: Tue, 2 Feb 2016 05:55:28 -0700 Subject: local function variables i feel dumb --- .zshrc-freebsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.zshrc-freebsd') 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 -- cgit v1.2.3