mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Simplify fisher_help, update docs.
This commit is contained in:
parent
18e5103271
commit
d24a4f0bff
11 changed files with 77 additions and 207 deletions
18
README.md
18
README.md
|
@ -36,16 +36,10 @@ curl -sL get.fisherman.sh | fish
|
||||||
|
|
||||||
The Fisherman CLI consists of the following commands: *install*, *update*, *uninstall*, *list*, *search* and *help*.
|
The Fisherman CLI consists of the following commands: *install*, *update*, *uninstall*, *list*, *search* and *help*.
|
||||||
|
|
||||||
Fisherman knows the following aliases too: *i* for install, *u* for update, *l* for list, *s* for search and *h* for help.
|
Fisherman knows the following aliases: *i* for install, *u* for update, *l* for list, *s* for search and *h* for help.
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
* Update Fisherman.
|
|
||||||
|
|
||||||
```fish
|
|
||||||
fisher update
|
|
||||||
```
|
|
||||||
|
|
||||||
* Install plugins.
|
* Install plugins.
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
|
@ -70,6 +64,12 @@ fisher install owner/repo
|
||||||
fisher install gist.github.com/owner/1f40e1c6e0551b2666b2
|
fisher install gist.github.com/owner/1f40e1c6e0551b2666b2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
* Update Fisherman.
|
||||||
|
|
||||||
|
```fish
|
||||||
|
fisher update
|
||||||
|
```
|
||||||
|
|
||||||
* Update plugins.
|
* Update plugins.
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
|
@ -270,8 +270,8 @@ This file is automatically updated as you install and uninstall plugins.
|
||||||
* $fisher_cache<br>
|
* $fisher_cache<br>
|
||||||
The cache directory. Plugins are downloaded to this location.
|
The cache directory. Plugins are downloaded to this location.
|
||||||
|
|
||||||
* $fisher_alias *command*=*alias*[,*alias2*] ...<br>
|
* $fisher_alias *command*=*alias* ...<br>
|
||||||
Use this variable to customize Fisherman command aliases.
|
Use this variable to create aliases of Fisherman commands.
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
|
|
||||||
|
|
|
@ -25,27 +25,15 @@ function fisher -d "Fish plugin manager"
|
||||||
|
|
||||||
switch "$option"
|
switch "$option"
|
||||||
case command
|
case command
|
||||||
switch "$version"
|
set -l IFS =
|
||||||
case 2.1.\* 2.0.0
|
set -l default_alias install=i update=u search=s list=l help=h new=n
|
||||||
if test ! -z "$fisher_alias"
|
|
||||||
printf "fisher: fish 2.2.0 or above is required to use aliases."
|
|
||||||
end
|
|
||||||
|
|
||||||
case \*
|
printf "%s\n" $fisher_alias $default_alias | while read -l command alias
|
||||||
if test -z "$fisher_alias"
|
if test "$value" = "$alias"
|
||||||
set -g fisher_alias install=i update=u search=s list=l help=h
|
set value "$command"
|
||||||
end
|
|
||||||
|
|
||||||
printf "%s\n" $fisher_alias | sed 's/[=,]/ /g' | while read -la alias
|
|
||||||
if set -q alias[2]
|
|
||||||
switch "$value"
|
|
||||||
case $alias[2..-1]
|
|
||||||
set value $alias[1]
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if not functions -q "fisher_$value"
|
if not functions -q "fisher_$value"
|
||||||
printf "fisher: '%s' is not a valid command\n" "$value" > /dev/stderr
|
printf "fisher: '%s' is not a valid command\n" "$value" > /dev/stderr
|
||||||
|
@ -66,21 +54,27 @@ function fisher -d "Fish plugin manager"
|
||||||
sed 's/^/fisher version /' $fisher_home/VERSION
|
sed 's/^/fisher version /' $fisher_home/VERSION
|
||||||
|
|
||||||
case help
|
case help
|
||||||
printf "Usage: fisher <command> [<arguments>] [--help] [--version]\n\n"
|
printf "Usage: fisher <command> [<options>] [--help] [--version]\n\n"
|
||||||
|
|
||||||
set -l color (set_color $fish_color_command -u)
|
set -l color (set_color $fish_color_command -u)
|
||||||
set -l color_normal (set_color normal)
|
set -l color_normal (set_color normal)
|
||||||
|
|
||||||
printf "Available Commands:\n"
|
printf "Commands:\n"
|
||||||
|
|
||||||
fisher_help --commands=bare | sed -E "
|
__fisher_help_commands | sed "
|
||||||
s/ (h)/ $color\1$color_normal/
|
|
||||||
s/ (i)/ $color\1$color_normal/
|
s/^/ /
|
||||||
s/ (l)/ $color\1$color_normal/
|
s/;/"\t" /
|
||||||
s/ (s)/ $color\1$color_normal/
|
|
||||||
s/ (u)p/ $color\1$color_normal"p"/
|
" | column -ts\t | sed -E "
|
||||||
|
s/^ (h)(elp)/ $color\1$color_normal\2/
|
||||||
|
s/^ (i)(nstall)/ $color\1$color_normal\2/
|
||||||
|
s/^ (s)(earch)/ $color\1$color_normal\2/
|
||||||
|
s/^ (u)(pdate)/ $color\1$color_normal\2/
|
||||||
|
s/^ (l)(ist)/ $color\1$color_normal\2/
|
||||||
|
s/^ (n)(ew)/ $color\1$color_normal\2/
|
||||||
"
|
"
|
||||||
|
|
||||||
printf "\nUse fisher help <command> to access a man page.\n"
|
printf "\nUse fisher help <command> to get help.\n"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,16 +13,12 @@ function fisher_help -d "Show help"
|
||||||
set option man
|
set option man
|
||||||
set value $2
|
set value $2
|
||||||
|
|
||||||
case commands
|
|
||||||
set option $option commands
|
|
||||||
set value $2
|
|
||||||
|
|
||||||
case usage
|
case usage
|
||||||
set option usage
|
set option usage
|
||||||
set value $value $2
|
set value $value $2
|
||||||
|
|
||||||
case h
|
case h
|
||||||
printf "Usage: fisher help [<keyword>] [--help]\n"
|
printf "Usage: fisher help [<keyword>]\n"
|
||||||
return
|
return
|
||||||
|
|
||||||
case \*
|
case \*
|
||||||
|
@ -32,10 +28,6 @@ function fisher_help -d "Show help"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q option[1]
|
|
||||||
set option commands
|
|
||||||
end
|
|
||||||
|
|
||||||
switch "$option"
|
switch "$option"
|
||||||
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) }')
|
||||||
|
@ -50,15 +42,5 @@ function fisher_help -d "Show help"
|
||||||
|
|
||||||
case usage
|
case usage
|
||||||
__fisher_help_usage $value
|
__fisher_help_usage $value
|
||||||
|
|
||||||
case \*
|
|
||||||
if test "$value" != bare
|
|
||||||
fisher --help=$option
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if contains -- commands $option
|
|
||||||
__fisher_help_commands
|
|
||||||
end | sed 's/^/ /;s/;/'\t'/' | column -ts\t
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
.\" generated with Ronn/v0.7.3
|
.\" generated with Ronn/v0.7.3
|
||||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||||
.
|
.
|
||||||
.TH "FISHER\-HELP" "1" "February 2016" "" "fisherman"
|
.TH "FISHER\-HELP" "1" "March 2016" "" "fisherman"
|
||||||
.
|
.
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBfisher\-help\fR \- Show help about Fisherman
|
\fBfisher\-help\fR \- Show help about Fisherman
|
||||||
.
|
.
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
fisher help [\fIkeyword\fR] [\-\-all] [\-\-guides] [\-\-usage[=\fIcommand\fR]] [\-\-help]
|
fisher help [\fIcommand\fR] [\-\-help]
|
||||||
.
|
.
|
||||||
.br
|
.br
|
||||||
.
|
.
|
||||||
|
@ -15,12 +15,6 @@ fisher help [\fIkeyword\fR] [\-\-all] [\-\-guides] [\-\-usage[=\fIcommand\fR]] [
|
||||||
fisher help \fIcommand\fR
|
fisher help \fIcommand\fR
|
||||||
.
|
.
|
||||||
.br
|
.br
|
||||||
fisher help \fIguide\fR
|
|
||||||
.
|
|
||||||
.br
|
|
||||||
fisher help \-\-usage=[\fIcommand\fR]
|
|
||||||
.
|
|
||||||
.br
|
|
||||||
.
|
.
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
Help displays \fIcommand\fR documentation, usage, guides and tutorials\.
|
Help displays \fIcommand\fR documentation, usage, guides and tutorials\.
|
||||||
|
@ -51,71 +45,8 @@ There are utilities that can help you generate man pages from other text formats
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
\-a, \-\-all
|
|
||||||
List all available commands and guides\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\-g, \-\-guides[=\fIbare\fR]
|
|
||||||
List guides / tutorials\. Use \fIbare\fR to generate easy to parse output\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\-\-commands[=\fIbare\fR]
|
|
||||||
List commands\. This is the default behavior of fisher help\. Use \fIbare\fR to generate easy to parse output\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\-\-usage[=\fIcommand\fR]
|
|
||||||
Display usage help for \fIcommand\fR\. To teach Fisherman how to display help for your command, \fIcommand\fR must implement a \-h flag\.
|
|
||||||
.
|
|
||||||
.TP
|
|
||||||
\-h, \-\-help
|
\-h, \-\-help
|
||||||
Show usage help\.
|
Show usage help\.
|
||||||
.
|
.
|
||||||
.SH "EXAMPLES"
|
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
|
||||||
Show all the existing documentation\.
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.IP "" 4
|
|
||||||
.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
fisher help \-\-all
|
|
||||||
.
|
|
||||||
.fi
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
|
||||||
Show help about help\.
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.IP "" 4
|
|
||||||
.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
fisher help help
|
|
||||||
.
|
|
||||||
.fi
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.IP "\(bu" 4
|
|
||||||
Show usage help for all available commands\.
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.IP "" 4
|
|
||||||
.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
fisher help \-\-commands=bare | fisher help \-\-usage
|
|
||||||
.
|
|
||||||
.fi
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
man(1), fisher(1)
|
man(1), fisher(1)
|
||||||
|
|
|
@ -3,13 +3,11 @@ fisher-help(1) -- Show help about Fisherman
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
|
|
||||||
fisher help [*keyword*] [--all] [--guides] [--usage[=*command*]] [--help]<br>
|
fisher help [*command*] [--help]<br>
|
||||||
|
|
||||||
## USAGE
|
## USAGE
|
||||||
|
|
||||||
fisher help *command*<br>
|
fisher help *command*<br>
|
||||||
fisher help *guide*<br>
|
|
||||||
fisher help --usage=[*command*]<br>
|
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
|
@ -31,41 +29,9 @@ There are utilities that can help you generate man pages from other text formats
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
* -a, --all:
|
|
||||||
List all available commands and guides.
|
|
||||||
|
|
||||||
* -g, --guides[=*bare*]:
|
|
||||||
List guides / tutorials. Use *bare* to generate easy to parse output.
|
|
||||||
|
|
||||||
* --commands[=*bare*]:
|
|
||||||
List commands. This is the default behavior of fisher help. Use *bare* to generate easy to parse output.
|
|
||||||
|
|
||||||
* --usage[=*command*]:
|
|
||||||
Display usage help for *command*. To teach Fisherman how to display help for your command, *command* must implement a -h flag.
|
|
||||||
|
|
||||||
* -h, --help:
|
* -h, --help:
|
||||||
Show usage help.
|
Show usage help.
|
||||||
|
|
||||||
## EXAMPLES
|
|
||||||
|
|
||||||
* Show all the existing documentation.
|
|
||||||
|
|
||||||
```
|
|
||||||
fisher help --all
|
|
||||||
```
|
|
||||||
|
|
||||||
* Show help about help.
|
|
||||||
|
|
||||||
```
|
|
||||||
fisher help help
|
|
||||||
```
|
|
||||||
|
|
||||||
* Show usage help for all available commands.
|
|
||||||
|
|
||||||
```
|
|
||||||
fisher help --commands=bare | fisher help --usage
|
|
||||||
```
|
|
||||||
|
|
||||||
## SEE ALSO
|
## SEE ALSO
|
||||||
|
|
||||||
man(1), fisher(1)
|
man(1), fisher(1)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
\fBfisher\fR \- Fish plugin manager
|
\fBfisher\fR \- Fish plugin manager
|
||||||
.
|
.
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
fisher \fIcommand\fR [\fIarguments\fR] [\-\-version] [\-\-help]
|
fisher \fIcommand\fR [\fIoptions\fR] [\-\-version] [\-\-help]
|
||||||
.
|
.
|
||||||
.br
|
.br
|
||||||
.
|
.
|
||||||
|
@ -24,7 +24,7 @@ Run a command\.
|
||||||
.
|
.
|
||||||
.nf
|
.nf
|
||||||
|
|
||||||
fisher <command> [<arguments>]
|
fisher <command> [<options>]
|
||||||
.
|
.
|
||||||
.fi
|
.fi
|
||||||
.
|
.
|
||||||
|
@ -44,7 +44,7 @@ fisher help <command>
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
Fisherman knows the following too: \fIi\fR for install, \fIu\fR for update, \fIl\fR for list, \fIs\fR for search and \fIh\fR for help\.
|
Fisherman knows the following aliases: \fIi\fR for install, \fIu\fR for update, \fIl\fR for list, \fIs\fR for search and \fIh\fR for help\.
|
||||||
.
|
.
|
||||||
.SH "OPTIONS"
|
.SH "OPTIONS"
|
||||||
.
|
.
|
||||||
|
@ -57,19 +57,6 @@ Show version information\. Fisherman follows Semantic Versioning and uses Git an
|
||||||
Show usage help\.
|
Show usage help\.
|
||||||
.
|
.
|
||||||
.SH "EXAMPLES"
|
.SH "EXAMPLES"
|
||||||
Update Fisherman\.
|
|
||||||
.
|
|
||||||
.IP "" 4
|
|
||||||
.
|
|
||||||
.nf
|
|
||||||
|
|
||||||
fisher update
|
|
||||||
.
|
|
||||||
.fi
|
|
||||||
.
|
|
||||||
.IP "" 0
|
|
||||||
.
|
|
||||||
.P
|
|
||||||
Install plugins\.
|
Install plugins\.
|
||||||
.
|
.
|
||||||
.IP "" 4
|
.IP "" 4
|
||||||
|
@ -122,6 +109,19 @@ fisher install gist\.github\.com/owner/1f40e1c6e0551b2666b2
|
||||||
.IP "" 0
|
.IP "" 0
|
||||||
.
|
.
|
||||||
.P
|
.P
|
||||||
|
Update Fisherman\.
|
||||||
|
.
|
||||||
|
.IP "" 4
|
||||||
|
.
|
||||||
|
.nf
|
||||||
|
|
||||||
|
fisher update
|
||||||
|
.
|
||||||
|
.fi
|
||||||
|
.
|
||||||
|
.IP "" 0
|
||||||
|
.
|
||||||
|
.P
|
||||||
Update plugins\.
|
Update plugins\.
|
||||||
.
|
.
|
||||||
.IP "" 4
|
.IP "" 4
|
||||||
|
@ -447,8 +447,8 @@ $fisher_cache
|
||||||
The cache directory\. Plugins are downloaded to this location\.
|
The cache directory\. Plugins are downloaded to this location\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
$fisher_alias \fIcommand\fR=\fIalias\fR[,\fIalias2\fR] \.\.\.
|
$fisher_alias \fIcommand\fR=\fIalias\fR \.\.\.
|
||||||
Use this variable to customize Fisherman command aliases\.
|
Use this variable to create aliases of Fisherman commands\.
|
||||||
.
|
.
|
||||||
.SH "PLUGINS"
|
.SH "PLUGINS"
|
||||||
Plugins can be utilities, prompts, commands or snippets\.
|
Plugins can be utilities, prompts, commands or snippets\.
|
||||||
|
|
|
@ -3,7 +3,7 @@ fisher(1) -- Fish plugin manager
|
||||||
|
|
||||||
## SYNOPSIS
|
## SYNOPSIS
|
||||||
|
|
||||||
fisher *command* [*arguments*] [--version] [--help]<br>
|
fisher *command* [*options*] [--version] [--help]<br>
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ The CLI consists of the following commands: *install*, *update*, *uninstall*, *l
|
||||||
Run a command.
|
Run a command.
|
||||||
|
|
||||||
```
|
```
|
||||||
fisher <command> [<arguments>]
|
fisher <command> [<options>]
|
||||||
```
|
```
|
||||||
|
|
||||||
Get help about a command.
|
Get help about a command.
|
||||||
|
@ -25,7 +25,7 @@ Get help about a command.
|
||||||
fisher help <command>
|
fisher help <command>
|
||||||
```
|
```
|
||||||
|
|
||||||
Fisherman knows the following too: *i* for install, *u* for update, *l* for list, *s* for search and *h* for help.
|
Fisherman knows the following aliases: *i* for install, *u* for update, *l* for list, *s* for search and *h* for help.
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
|
@ -37,12 +37,6 @@ Fisherman knows the following too: *i* for install, *u* for update, *l* for list
|
||||||
|
|
||||||
## EXAMPLES
|
## EXAMPLES
|
||||||
|
|
||||||
Update Fisherman.
|
|
||||||
|
|
||||||
```fish
|
|
||||||
fisher update
|
|
||||||
```
|
|
||||||
|
|
||||||
Install plugins.
|
Install plugins.
|
||||||
|
|
||||||
```fish
|
```fish
|
||||||
|
@ -67,6 +61,12 @@ Install a plugin from a Gist URL.
|
||||||
fisher install gist.github.com/owner/1f40e1c6e0551b2666b2
|
fisher install gist.github.com/owner/1f40e1c6e0551b2666b2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Update Fisherman.
|
||||||
|
|
||||||
|
```fish
|
||||||
|
fisher update
|
||||||
|
```
|
||||||
|
|
||||||
Update plugins.
|
Update plugins.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -266,8 +266,8 @@ This file is automatically updated as you install and uninstall plugins.
|
||||||
* $fisher_cache:
|
* $fisher_cache:
|
||||||
The cache directory. Plugins are downloaded to this location.
|
The cache directory. Plugins are downloaded to this location.
|
||||||
|
|
||||||
* $fisher_alias *command*=*alias*[,*alias2*] ...:
|
* $fisher_alias *command*=*alias* ...:
|
||||||
Use this variable to customize Fisherman command aliases.
|
Use this variable to create aliases of Fisherman commands.
|
||||||
|
|
||||||
|
|
||||||
## PLUGINS
|
## PLUGINS
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
set -l mock_command awk
|
set -l mock_command awk
|
||||||
|
|
||||||
function -S setup
|
function -S setup
|
||||||
set -g fisher_alias "$mock_command=A,B"
|
set -g fisher_alias "$mock_command=A"
|
||||||
|
|
||||||
function fisher_$mock_command
|
function fisher_$mock_command
|
||||||
if not set -q argv[1]
|
if not set -q argv[1]
|
||||||
|
@ -29,17 +29,20 @@ test "$TESTNAME - Display version information"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - Handle \$fisher_alias aliases"
|
test "$TESTNAME - Handle \$fisher_alias aliases"
|
||||||
(fisher A; fisher B) = (fisher $mock_command; fisher $mock_command)
|
(fisher A) = (
|
||||||
|
fisher $mock_command
|
||||||
|
fisher $mock_command
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - Display usage help"
|
test "$TESTNAME - Display usage help"
|
||||||
(fisher | sed 1q) = "Usage: fisher <command> [<arguments>] [--help] [--version]"
|
(fisher | sed 1q) = "Usage: fisher <command> [<options>] [--help] [--version]"
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - Display basic information help info about 'help'"
|
test "$TESTNAME - Display basic information help info about 'help'"
|
||||||
(fisher | tail -n2 | xargs) = "Use fisher help <command> to access a man page."
|
(fisher | tail -n2 | xargs) = "Use fisher help <command> to get help."
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - Display basic information about available commands"
|
test "$TESTNAME - Display basic information about available commands"
|
||||||
(fisher | sed -E 's/ +//' | grep "^$mock_command\$")
|
(fisher | sed -E 's/^[ ]+//' | grep "^$mock_command")
|
||||||
end
|
end
|
||||||
|
|
2
test/fixtures/help/usage.txt
vendored
2
test/fixtures/help/usage.txt
vendored
|
@ -28,4 +28,4 @@ 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>] [--help]
|
Usage: fisher help [<keyword>]
|
||||||
|
|
|
@ -28,5 +28,7 @@ for i in $sections
|
||||||
end
|
end
|
||||||
|
|
||||||
test "$TESTNAME - Display usage help for every command"
|
test "$TESTNAME - Display usage help for every command"
|
||||||
(cat $DIRNAME/fixtures/help/usage.txt) = (fisher help --commands=bare | fisher help --usage)
|
(cat $DIRNAME/fixtures/help/usage.txt) = (
|
||||||
|
__fisher_help_commands | cut -f1 -d \; | fisher help --usage
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# We need to iterate over each page because piping to | xargs man will use
|
|
||||||
# the system `man` instead of our fish-only wrapper.
|
|
||||||
|
|
||||||
for page in (fisher help --commands=bare | awk '{ print "fisher-"$1 }')
|
|
||||||
test "$TESTNAME - Wrap man and add fisherman to MANPATH to display fisher docs"
|
|
||||||
"$page(1)" = (man $page | awk '{ print tolower($1); exit }')
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in a new issue