From d87599c344600e6f925f5d4041e09cfe2f244e05 Mon Sep 17 00:00:00 2001 From: LeeW Date: Sun, 6 Sep 2015 22:18:29 +0800 Subject: [PATCH] Remove help from git-ignore-io --- bin/git-ignore-io | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) mode change 100644 => 100755 bin/git-ignore-io diff --git a/bin/git-ignore-io b/bin/git-ignore-io old mode 100644 new mode 100755 index a444b69..18d2353 --- a/bin/git-ignore-io +++ b/bin/git-ignore-io @@ -50,20 +50,14 @@ gi_append() { } show_usage() { - echo "usage: gi " - echo " [-a| -e] " - echo " [-u| -t| -l| -L]" - echo " [-h]" -} - -print_help_message() { - echo "-a [types] apeend new .gitignore content to .gitignore under the current directory" - echo "-e [types] export new .gitignore to the current directory (The old one will be replaced.)" - echo "-L print ~/.gi_list in alphabetical order" - echo "-l print ~/.gi_list in table format" - echo "-u update ~/.gi_list" - echo "-t show the last modified time of ~/.gi_list" - echo "-h show help" + echo "Usage:" + echo " git ignore-io ... Show gitignore template" + echo " [-a|--append] ... Apeend new .gitignore content to .gitignore under the current directory" + echo " [-e|--export] ... Export new .gitignore to the current directory (The old one will be replaced)" + echo " [-l] Print available types in alphabetical order " + echo " [-L] Print available types in table format" + echo " [-t|--show-update-time] Show the last modified time of ~/.gi_list (where the list of available types stored)" + echo " [-u|--update-list] Update ~/.gi_list" } @@ -72,7 +66,7 @@ if [[ $# -eq 0 ]]; then show_usage else case $1 in - -a|-e) + -a|--append|-e|--export) opt=$1 shift if [[ $# -eq 0 ]]; then @@ -82,20 +76,20 @@ else gi_to_curl=`echo $@ | tr " " ","` case $opt in - -a) + -a|--append) gi_append $gi_to_curl ;; - -e) + -e|--export) gi_export $gi_to_curl ;; esac exit ;; - -t) + -t|--show-update-time) print_last_modified_time ;; - -u) + -u|--update-list) update_gi_list ;; -L) @@ -104,9 +98,6 @@ else -l) print_in_table_format ;; - -h) - print_help_message - ;; -*) echo No Such option show_usage