aboutsummaryrefslogtreecommitdiff
path: root/g.sh
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2016-02-04 10:37:43 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2016-02-04 10:37:43 +0100
commitb3e0e8a91926d964aae7379c7c4812ef5324886f (patch)
tree67aeb10d72493fc203d7a2e61e4b6dbf2642d5fc /g.sh
parent6e8ff91e3fc6cc2cf794fc18dfb9d13329dee6a9 (diff)
downloadg-b3e0e8a91926d964aae7379c7c4812ef5324886f.tar.gz
g-b3e0e8a91926d964aae7379c7c4812ef5324886f.zip
Polishing
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'g.sh')
-rw-r--r--g.sh5
1 files 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
}