[#84] Beautify -h (4×' ', 15×opt, desc)

This commit is contained in:
Ivan Tham 2016-02-25 21:40:12 +08:00
parent 85e3e603d8
commit 2a51c37bd8
6 changed files with 32 additions and 42 deletions

View File

@ -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 [<keyword>] [--all] [--guides] [--help]\n\n"
printf " -a --all List available documentation\n"
printf " -g --guides List available guides\n"
printf " --usage[=<cmd>] Display command usage\n"
printf " -h --help Show usage help\n"
printf " --usage[=<cmd>] Display command usage\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) }')

View File

@ -18,7 +18,6 @@ function fisher_install -d "Install Plugins"
case h
printf "Usage: fisher install [<plugins>] [--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"

View File

@ -62,10 +62,9 @@ function fisher_search -d "Search Plugins"
case h
printf "Usage: fisher search [<plugins>] [--and|--or] [--quiet] [--help]\n\n"
printf " *--<field> Filter by url, name, info, author or tags\n"
printf " -o --or Join query with OR operator\n"
printf " --<field> 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

View File

@ -18,7 +18,6 @@ function fisher_uninstall -d "Uninstall Plugins"
case h
printf "Usage: fisher uninstall [<plugins>] [--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"

View File

@ -9,9 +9,9 @@ Usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help]
-h --help Show usage help
Usage: fisher search [<plugins>] [--and|--or] [--quiet] [--help]
*--<field> Filter by url, name, info, author or tags
-o --or Join query with OR operator
--<field> 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 [<plugins>] [--force] [--quiet] [--help]
@ -23,5 +23,5 @@ Usage: fisher help [<keyword>] [--all] [--guides] [--help]
-a --all List available documentation
-g --guides List available guides
--usage[=<cmd>] Display command usage
-h --help Show usage help
--usage[=<cmd>] Display command usage