From b3e0e8a91926d964aae7379c7c4812ef5324886f Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 4 Feb 2016 10:37:43 +0100 Subject: Polishing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- g.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/g.sh b/g.sh index f00ff17..a245c81 100644 --- a/g.sh +++ b/g.sh @@ -33,18 +33,17 @@ HERE # Fill the hash of shortcuts with the contents of the __g_file. __g_get_shortcuts() { - local i=0 word="" + local word="" __g_shortcuts=() while read line; do if [ ! -z "$line" ]; then - if [ "$word" = "" ]; then + if [ -z "$word" ]; then word=$line else __g_shortcuts[$word]=$(eval echo $line) word="" fi - i=$(($i+1)) fi done < $__g_file } -- cgit v1.2.3