mirror of
https://github.com/jorgebucaran/fisher
synced 2024-09-10 15:07:40 +02:00
Merge pull request #126 from pickfire/master
[#84] Beautify -h (4×' ', 15×opt, desc)
This commit is contained in:
commit
d99b86c2ec
6 changed files with 32 additions and 42 deletions
|
@ -29,16 +29,12 @@ function fisher_help -d "Show Help"
|
||||||
set option usage
|
set option usage
|
||||||
set value $value $2
|
set value $value $2
|
||||||
|
|
||||||
case help
|
|
||||||
set option help
|
|
||||||
|
|
||||||
case h
|
case h
|
||||||
printf "Usage: fisher help [<keyword>] [--all] [--guides] [--help]\n\n"
|
printf "Usage: fisher help [<keyword>] [--all] [--guides] [--help]\n\n"
|
||||||
|
printf " -a --all List available documentation\n"
|
||||||
printf " -a --all List available documentation\n"
|
printf " -g --guides List available guides\n"
|
||||||
printf " -g --guides List available guides\n"
|
printf " -h --help Show usage help\n"
|
||||||
printf " --usage[=<cmd>] Display command usage\n"
|
printf " --usage[=<cmd>] Display command usage\n"
|
||||||
printf " -h --help Show usage help\n"
|
|
||||||
return
|
return
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
@ -53,9 +49,6 @@ function fisher_help -d "Show Help"
|
||||||
end
|
end
|
||||||
|
|
||||||
switch "$option"
|
switch "$option"
|
||||||
case help
|
|
||||||
man fisher-help
|
|
||||||
|
|
||||||
case man
|
case man
|
||||||
set -l value (printf "%s\n" $value | awk '{ print tolower($0) }')
|
set -l value (printf "%s\n" $value | awk '{ print tolower($0) }')
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,9 @@ function fisher_install -d "Install Plugins"
|
||||||
|
|
||||||
case h
|
case h
|
||||||
printf "Usage: fisher install [<plugins>] [--force] [--quiet] [--help]\n\n"
|
printf "Usage: fisher install [<plugins>] [--force] [--quiet] [--help]\n\n"
|
||||||
|
printf " -f --force Reinstall given plugin/s\n"
|
||||||
printf " -f --force Reinstall given plugin/s\n"
|
printf " -q --quiet Enable quiet mode\n"
|
||||||
printf " -q --quiet Enable quiet mode\n"
|
printf " -h --help Show usage help\n"
|
||||||
printf " -h --help Show usage help\n"
|
|
||||||
return
|
return
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
|
|
@ -62,12 +62,11 @@ function fisher_search -d "Search Plugins"
|
||||||
|
|
||||||
case h
|
case h
|
||||||
printf "Usage: fisher search [<plugins>] [--and|--or] [--quiet] [--help]\n\n"
|
printf "Usage: fisher search [<plugins>] [--and|--or] [--quiet] [--help]\n\n"
|
||||||
|
printf " --<field> x Filter by url, name, info, author or tags\n"
|
||||||
printf " *--<field> 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 " -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 " -q --quiet Enable quiet mode\n"
|
printf " -h --help Show usage help\n"
|
||||||
printf " -h --help Show usage help\n"
|
|
||||||
return
|
return
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
|
|
@ -18,10 +18,9 @@ function fisher_uninstall -d "Uninstall Plugins"
|
||||||
|
|
||||||
case h
|
case h
|
||||||
printf "Usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help]\n\n"
|
printf "Usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help]\n\n"
|
||||||
|
printf " -f --force Delete copy from cache\n"
|
||||||
printf " -f --force Delete copy from cache\n"
|
printf " -q --quiet Enable quiet mode\n"
|
||||||
printf " -q --quiet Enable quiet mode\n"
|
printf " -h --help Show usage help\n"
|
||||||
printf " -h --help Show usage help\n"
|
|
||||||
return
|
return
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
|
|
@ -19,8 +19,8 @@ function fisher_update -d "Update Plugins/Fisherman"
|
||||||
|
|
||||||
case h
|
case h
|
||||||
printf "Usage: fisher update [<plugins>] [--quiet] [--help]\n\n"
|
printf "Usage: fisher update [<plugins>] [--quiet] [--help]\n\n"
|
||||||
printf " -q --quiet Enable quiet mode\n"
|
printf " -q --quiet Enable quiet mode\n"
|
||||||
printf " -h --help Show usage help\n"
|
printf " -h --help Show usage help\n"
|
||||||
return
|
return
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
|
32
test/fixtures/help/usage.txt
vendored
32
test/fixtures/help/usage.txt
vendored
|
@ -1,27 +1,27 @@
|
||||||
Usage: fisher update [<plugins>] [--quiet] [--help]
|
Usage: fisher update [<plugins>] [--quiet] [--help]
|
||||||
|
|
||||||
-q --quiet Enable quiet mode
|
-q --quiet Enable quiet mode
|
||||||
-h --help Show usage help
|
-h --help Show usage help
|
||||||
Usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help]
|
Usage: fisher uninstall [<plugins>] [--force] [--quiet] [--help]
|
||||||
|
|
||||||
-f --force Delete copy from cache
|
-f --force Delete copy from cache
|
||||||
-q --quiet Enable quiet mode
|
-q --quiet Enable quiet mode
|
||||||
-h --help Show usage help
|
-h --help Show usage help
|
||||||
Usage: fisher search [<plugins>] [--and|--or] [--quiet] [--help]
|
Usage: fisher search [<plugins>] [--and|--or] [--quiet] [--help]
|
||||||
|
|
||||||
*--<field> Filter by url, name, info, author or tags
|
--<field> x Filter by url, name, info, author or tags
|
||||||
-o --or Join query with OR operator
|
-a --and Join query with AND operator
|
||||||
-a --and Join query with AND operator
|
-o --or Join query with OR operator
|
||||||
-q --quiet Enable quiet mode
|
-q --quiet Enable quiet mode
|
||||||
-h --help Show usage help
|
-h --help Show usage help
|
||||||
Usage: fisher install [<plugins>] [--force] [--quiet] [--help]
|
Usage: fisher install [<plugins>] [--force] [--quiet] [--help]
|
||||||
|
|
||||||
-f --force Reinstall given plugin/s
|
-f --force Reinstall given plugin/s
|
||||||
-q --quiet Enable quiet mode
|
-q --quiet Enable quiet mode
|
||||||
-h --help Show usage help
|
-h --help Show usage help
|
||||||
Usage: fisher help [<keyword>] [--all] [--guides] [--help]
|
Usage: fisher help [<keyword>] [--all] [--guides] [--help]
|
||||||
|
|
||||||
-a --all List available documentation
|
-a --all List available documentation
|
||||||
-g --guides List available guides
|
-g --guides List available guides
|
||||||
|
-h --help Show usage help
|
||||||
--usage[=<cmd>] Display command usage
|
--usage[=<cmd>] Display command usage
|
||||||
-h --help Show usage help
|
|
||||||
|
|
Loading…
Reference in a new issue