diff options
| author | Miquel Sabaté <msabate@suse.com> | 2015-07-28 09:38:02 +0200 |
|---|---|---|
| committer | Miquel Sabaté <msabate@suse.com> | 2015-07-28 09:38:02 +0200 |
| commit | 3b18f5039369f2bea673b0bcf1c6dcbb459f248f (patch) | |
| tree | 2b2a599712bb1d92939387f1dc1b288c2fae74ff /g.sh | |
| parent | a54d534d35851edf5e5c33a44a9218318eb42a81 (diff) | |
| download | g-3b18f5039369f2bea673b0bcf1c6dcbb459f248f.tar.gz g-3b18f5039369f2bea673b0bcf1c6dcbb459f248f.zip | |
Improved the layout of the help command
Diffstat (limited to 'g.sh')
| -rw-r--r-- | g.sh | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -24,10 +24,13 @@ usage() { # Print the help message. help() { usage - echo -e "\nThe g command are:" - echo -e " add\tAdd a new shortcut." - echo -e " rm\tRemove a shorcut." - echo -e " list\tList all the available shortcuts." + echo -e "\nThe g commands are:" + tab=$'\t' + column -t -s $'\t' <<HERE + add${tab}Add a new shortcut. + rm${tab}Remove a shorcut. + list${tab}List all the available shortcuts. +HERE } # Fill the hash of shortcuts with the contents of the gfile. @@ -62,7 +65,7 @@ save_shortcuts() { # The main function for this script. g() { - version="0.3" + version="0.3.1" cmd="$1" gfile=$HOME/.gfile declare -A gshortcuts @@ -76,7 +79,7 @@ g() { # Parse the command. case "$cmd" in -v | --version) - echo "g version: $version" + echo "g version $version" ;; -h | --help) help |
