diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2016-02-04 10:37:43 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2016-02-04 10:37:43 +0100 |
| commit | b3e0e8a91926d964aae7379c7c4812ef5324886f (patch) | |
| tree | 67aeb10d72493fc203d7a2e61e4b6dbf2642d5fc | |
| parent | 6e8ff91e3fc6cc2cf794fc18dfb9d13329dee6a9 (diff) | |
| download | g-b3e0e8a91926d964aae7379c7c4812ef5324886f.tar.gz g-b3e0e8a91926d964aae7379c7c4812ef5324886f.zip | |
Polishing
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
| -rw-r--r-- | g.sh | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 } |
