From 533dc85374bd2f229c2311d7b211674a839c0d5f Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Thu, 25 Feb 2016 21:40:12 +0800 Subject: [PATCH] =?UTF-8?q?[#84]=20Beautify=20-h=20(4=C3=97'=20',=2015?= =?UTF-8?q?=C3=97opt,=20desc)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/fisher_help.fish | 13 +++---------- functions/fisher_install.fish | 7 +++---- functions/fisher_search.fish | 11 +++++------ functions/fisher_uninstall.fish | 7 +++---- functions/fisher_update.fish | 4 ++-- test/fixtures/help/usage.txt | 32 ++++++++++++++++---------------- 6 files changed, 32 insertions(+), 42 deletions(-) diff --git a/functions/fisher_help.fish b/functions/fisher_help.fish index 6aa4fc3..8fa95f8 100644 --- a/functions/fisher_help.fish +++ b/functions/fisher_help.fish @@ -29,16 +29,12 @@ function fisher_help -d "Show Help" set option usage set value $value $2 - case help - set option help - case h printf "Usage: fisher help [] [--all] [--guides] [--help]\n\n" - - printf " -a --all List available documentation\n" - printf " -g --guides List available guides\n" + printf " -a --all List available documentation\n" + printf " -g --guides List available guides\n" + printf " -h --help Show usage help\n" printf " --usage[=] Display command usage\n" - printf " -h --help Show usage help\n" return case \* @@ -53,9 +49,6 @@ function fisher_help -d "Show Help" end switch "$option" - case help - man fisher-help - case man set -l value (printf "%s\n" $value | awk '{ print tolower($0) }') diff --git a/functions/fisher_install.fish b/functions/fisher_install.fish index f3d9ef8..8792f2b 100644 --- a/functions/fisher_install.fish +++ b/functions/fisher_install.fish @@ -18,10 +18,9 @@ function fisher_install -d "Install Plugins" case h printf "Usage: fisher install [] [--force] [--quiet] [--help]\n\n" - - printf " -f --force Reinstall given plugin/s\n" - printf " -q --quiet Enable quiet mode\n" - printf " -h --help Show usage help\n" + printf " -f --force Reinstall given plugin/s\n" + printf " -q --quiet Enable quiet mode\n" + printf " -h --help Show usage help\n" return case \* diff --git a/functions/fisher_search.fish b/functions/fisher_search.fish index 3c84079..0b18d95 100644 --- a/functions/fisher_search.fish +++ b/functions/fisher_search.fish @@ -62,12 +62,11 @@ function fisher_search -d "Search Plugins" case h printf "Usage: fisher search [] [--and|--or] [--quiet] [--help]\n\n" - - printf " *-- Filter by url, name, info, author or tags\n" - printf " -o --or Join query with OR operator\n" - printf " -a --and Join query with AND operator\n" - printf " -q --quiet Enable quiet mode\n" - printf " -h --help Show usage help\n" + printf " -- x Filter by url, name, info, author or tags\n" + printf " -a --and Join query with AND operator\n" + printf " -o --or Join query with OR operator\n" + printf " -q --quiet Enable quiet mode\n" + printf " -h --help Show usage help\n" return case \* diff --git a/functions/fisher_uninstall.fish b/functions/fisher_uninstall.fish index 0aada6b..376217d 100644 --- a/functions/fisher_uninstall.fish +++ b/functions/fisher_uninstall.fish @@ -18,10 +18,9 @@ function fisher_uninstall -d "Uninstall Plugins" case h printf "Usage: fisher uninstall [] [--force] [--quiet] [--help]\n\n" - - printf " -f --force Delete copy from cache\n" - printf " -q --quiet Enable quiet mode\n" - printf " -h --help Show usage help\n" + printf " -f --force Delete copy from cache\n" + printf " -q --quiet Enable quiet mode\n" + printf " -h --help Show usage help\n" return case \* diff --git a/functions/fisher_update.fish b/functions/fisher_update.fish index 3b83d41..e6cdbed 100644 --- a/functions/fisher_update.fish +++ b/functions/fisher_update.fish @@ -19,8 +19,8 @@ function fisher_update -d "Update Plugins/Fisherman" case h printf "Usage: fisher update [] [--quiet] [--help]\n\n" - printf " -q --quiet Enable quiet mode\n" - printf " -h --help Show usage help\n" + printf " -q --quiet Enable quiet mode\n" + printf " -h --help Show usage help\n" return case \* diff --git a/test/fixtures/help/usage.txt b/test/fixtures/help/usage.txt index 6fcfa2d..842a44e 100644 --- a/test/fixtures/help/usage.txt +++ b/test/fixtures/help/usage.txt @@ -1,27 +1,27 @@ Usage: fisher update [] [--quiet] [--help] - -q --quiet Enable quiet mode - -h --help Show usage help + -q --quiet Enable quiet mode + -h --help Show usage help Usage: fisher uninstall [] [--force] [--quiet] [--help] - -f --force Delete copy from cache - -q --quiet Enable quiet mode - -h --help Show usage help + -f --force Delete copy from cache + -q --quiet Enable quiet mode + -h --help Show usage help Usage: fisher search [] [--and|--or] [--quiet] [--help] - *-- Filter by url, name, info, author or tags - -o --or Join query with OR operator - -a --and Join query with AND operator - -q --quiet Enable quiet mode - -h --help Show usage help + -- x Filter by url, name, info, author or tags + -a --and Join query with AND operator + -o --or Join query with OR operator + -q --quiet Enable quiet mode + -h --help Show usage help Usage: fisher install [] [--force] [--quiet] [--help] - -f --force Reinstall given plugin/s - -q --quiet Enable quiet mode - -h --help Show usage help + -f --force Reinstall given plugin/s + -q --quiet Enable quiet mode + -h --help Show usage help Usage: fisher help [] [--all] [--guides] [--help] - -a --all List available documentation - -g --guides List available guides + -a --all List available documentation + -g --guides List available guides + -h --help Show usage help --usage[=] Display command usage - -h --help Show usage help