[#129] Beautify man pages

This commit is contained in:
Ivan Tham 2016-02-27 10:08:32 +08:00
parent f8d54bd32d
commit d4f2cd70e7
13 changed files with 88 additions and 96 deletions

View file

@ -3,7 +3,7 @@ fisher-help(1) -- Show Help
## SYNOPSIS
fisher `help` [*keyword*] [`--all`] [`--guides`] [`--usage`[=*command*]] [`--help`] <br>
fisher `help` [*keyword*] [`--all`] [`--guides`] [`--usage`[=*command*]] [`--help`]<br>
## USAGE
@ -15,19 +15,19 @@ fisher `help` `--usage`=[*command*]<br>
Help displays *command* documentation, usage, guides and tutorials.
Help is based in `man(1)` pages. To supply help with your own plugin or command, create one or more man.1~7 pages and add them to your project under the corresponding man/man% directory.
Help is based in `man`(1) pages. To supply help with your own plugin or command, create one or more man.1~7 pages and add them to your project under the corresponding man/man% directory.
```
my_plugin
|-- my_plugin.fish
|-- man
|-- man1
|-- my_plugin.1
`-- man
`-- man1
`-- my_plugin.1
```
Help for my_plugin is now available via `man(1)`. To add documentation to a `fisher` command, prepend the keyword `fisher-` to the man file, e.g., `fisher-my-command.1`. This will teach Fisherman how to access the man page using `fisher help my-command`.
Help for my_plugin is now available via `man`(1). To add documentation to a `fisher` command, prepend the keyword `fisher-` to the man file, e.g., `fisher-my-command.1`. This will teach Fisherman how to access the man page using `fisher help my-command`.
There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn(1)`. For an example without using external utilities, see *Example* in `fisher help plugins`.
There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn`(1). For an example without using external utilities, see *Example* in `fisher help plugins`.
## OPTIONS
@ -40,7 +40,7 @@ There are utilities that can help you generate man pages from other text formats
* `--commands[=*bare*]`:
List commands. This is the default behavior of `fisher help`. Use *bare* to generate easy to parse output.
* `-u --usage[=*command*]`:
* `--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`:
@ -68,5 +68,4 @@ fisher help --commands=bare | fisher help --usage
## SEE ALSO
man(1)<br>
fisher(1)<br>
`man`(1), `fisher`(1)

View file

@ -56,14 +56,14 @@ my_plugin
|-- README.md
|-- my_plugin.fish
|-- functions
| |-- my_plugin_helper.fish
| `-- my_plugin_helper.fish
|-- completions
| |-- my_plugin.fish
| `-- my_plugin.fish
|-- test
| |-- my_plugin.fish
|-- man
|-- man1
|-- my_plugin.1
| `-- my_plugin.fish
`-- man
`-- man1
`-- my_plugin.1
```
And here is the directory tree of `$fisher_config/` after running `fisher install my_plugin`:
@ -71,16 +71,16 @@ And here is the directory tree of `$fisher_config/` after running `fisher instal
```
$fisher_config
|-- functions
|-- my_plugin.fish
|-- my_plugin_helper.fish
| |-- my_plugin.fish
| `-- my_plugin_helper.fish
|-- completions
|-- my_plugin.fish
| `-- my_plugin.fish
|-- man
|-- man1
|-- my_plugin.1
|-- cache
| `-- man1
| `-- my_plugin.1
`-- cache
|-- my_other_plugin
|-- my_plugin/...
`-- my_plugin/...
```
In addition, any `init.fish` and `*.config.fish` files, are copied to `$fisher_config/conf.d` and evaluated during the start of the shell.
@ -91,13 +91,13 @@ To prevent name collisions, `init.fish` files are renamed to `my_plugin.init.fis
* Install plugins from multiple sources.
```fisher
```fish
fisher install fishtape simnalamburt/shellder ~/plugins/my_plugin
```
## SEE ALSO
fisher(1)<br>
fisher help config<br>
fisher help update<br>
fisher help uninstall<br>
`fisher`(1)<br>
`fisher help config`<br>
`fisher help update`<br>
`fisher help uninstall`<br>

View file

@ -20,16 +20,12 @@ fisher `search` *query*<br>
Search plugins in the Fisherman index.
The index file consists of records separated by blank lines `'\n\n'` and each record consists of fields separated by a single line `'\n'`.
The index file consists of records plugin name and info. `*` is shown if plugin is installed.
For example:
```
name
url
info
tag1 tag2 tag3 ...
author
name info
```
See *Index* in `fisher help tour` for more information about the index.
@ -88,7 +84,7 @@ fisher search --url | sed 's|https://github.com/||' | column
* Display remote plugins, i.e, those in the index, but *not* in the cache.
```fis
```fish
fisher search --and --name!=(fisher --list=bare)
```
@ -100,5 +96,5 @@ fisher search --name!~/^s/
## SEE ALSO
fisher(1)<br>
fisher help plugins<br>
`fisher`(1)<br>
`fisher help plugins`<br>

View file

@ -42,5 +42,5 @@ fisher --list | fisher uninstall --force
## SEE ALSO
fisher(1)<br>
fisher help plugins<br>
`fisher`(1)<br>
`fisher help plugins`<br>

View file

@ -32,17 +32,17 @@ If a plugin is missing dependencies, they will be installed. If any dependencies
* Update Fisherman
```
```fish
fisher update
```
* Update all the plugins in the cache.
* Update all the plugins in the cache *concurrently*.
```
fisher --list | fisher update -
```fish
fisher --list | cut -c 2- | xargs -n1 -P0 fish -c 'fisher update'
```
## SEE ALSO
fisher(1)<br>
fisher help plugins<br>
`fisher`(1)<br>
`fisher help plugins`<br>

View file

@ -8,13 +8,13 @@ fisher(1) -- Fish Plugin Manager
## DESCRIPTION
Fisherman is a blazing fast, modern plugin manager for `fish(1)`.
Fisherman is a blazing fast, modern plugin manager for `fish`(1).
The following commands are available: *install*, *uninstall*, *update*, *search* and *help*. See `fisher help <command>` for information about each command.
## OPTIONS
* `--list[=bare|url|all|enabled|disabled|theme|file]`:
* `-l --list[=bare|url|all|enabled|disabled|theme|file]`:
List local plugins according to a given option. Plugins are prepended with a legend character to indicate their kind. `*` for enabled plugins, `>` for the currently enabled prompt and `|` for symbolic links. To list plugins without the legend use `--list=bare`. Use a dash `-` to read from the standard input.
* `-v --version`:
@ -51,8 +51,8 @@ fisher install .
Fisherman was created by Jorge Bucaran *j@bucaran.me*.
See THANKS file for the complete list of contributors.
See THANKS.md file for the complete list of contributors.
## SEE ALSO
fisher help tour<br>
`fisher help tour`<br>

View file

@ -29,7 +29,7 @@ _ baz
The items on the left represent the option flags or *keys* associated with the CLI. The items on the right are the option *values*. The underscore `_` character is the default *key* for arguments without a key.
Use read(1) to process the generated stream and switch(1) to match patterns:
Use `read`(1) to process the generated stream and `switch`(1) to match patterns:
```
getopts -ab1 --foo=bar baz | while read -l key option
@ -44,7 +44,7 @@ end
## EXAMPLES
The following is a mock of fish(1) CLI.
The following is a mock of `fish`(1) CLI.
```
function fish

View file

@ -37,5 +37,5 @@ To understand this behavior, it helps to recall the shell's single scope for fun
## SEE ALSO
fisher(1)<br>
fisher help config<br>
`fisher`(1)<br>
`fisher help config`<br>

View file

@ -59,7 +59,6 @@ end
## SEE ALSO
fisher(1)<br>
fisher help tour<br>
funcsave(1)<br>
fisher help plugins<br>
`fisher`(1), `funcsave`(1)<br>
`fisher help tour`<br>
`fisher help plugins`<br>

View file

@ -26,7 +26,7 @@ Using the following variables, you can customize the locations of the cache, ind
The cache directory. Plugins are downloaded first here and installed to `$fisher_config/functions` afterwards. The cache is `$fisher_config/cache` by default.
* `$fisher_index`:
The URL to the index database. To use a different index set this to a file or URL. Redirect URLs are currently not supported due to security and performance concerns. The underlying request and fetch mechanism is based in `curl(1)`.
The URL to the index database. To use a different index set this to a file or URL. Redirect URLs are currently not supported due to security and performance concerns. The underlying request and fetch mechanism is based in `curl`(1).
* `$fisher_alias command=alias[,...] [command2=alias[,...]]`:
Use this variable to define custom aliases for fisher commands. See `Examples` below.
@ -41,4 +41,4 @@ set fisher_alias install=i,in,inst update=up
## SEE ALSO
fisher help tour
`fisher help tour`

View file

@ -7,15 +7,15 @@ This document attempts to answer some of Fisherman most frequently asked questio
### What is Fisherman?
Fisherman is a plugin manager for fish that lets you share and reuse code, prompts and configurations easily.
Fisherman is a fish plugin manager that lets you share and reuse code, prompts and configurations easily.
### What do I need to know to use Fisherman?
Nothing. You can continue using your shell as usual. When you are ready to learn more just type `fisher help` or `fisher help tour`.
Nothing, continue to use fish as usual. Ready to learn more? Type `fisher help` or `fisher help tour`.
### How do I access the documentation?
Fisherman documentation is based in UNIX `man(1)` pages. For basic usage and command enter `fisher help`. For help about a specific *command*, enter `fisher help <command>`. The following guides are also available:
Fisherman documentation is based in UNIX `man`(1) pages. For basic usage and command enter `fisher help`. For help about a specific *command*, enter `fisher help <command>`. The following guides are also available:
fisher help `faq`: Fisherman FAQ<br>
fisher help `tour`: Fisherman Tour<br>
@ -32,7 +32,7 @@ Plugins may list any number of dependencies to other plugins using a *fishfile*.
### What is a Fishfile?
A plain text file that lists what plugins you have installed or a plugin's dependencies to other plugins.
A plain text file consists of a lists of installed plugins or dependencies to other plugins.
Fishfiles let you share plugin configurations across multiple installations, allow plugins to declare dependencies, and prevent information loss in case of system failure. See also `fisher help fishfile`.

View file

@ -27,14 +27,14 @@ my_plugin
|-- fish_right_prompt.fish
|-- my_plugin.config.fish
|-- functions
| |-- my_plugin_helper.fish
| `-- my_plugin_helper.fish
|-- conf.d
| |-- *.fish
| `-- *.fish
|-- completions
| |-- my_plugin.fish
|-- man
|-- man1
|-- my_plugin.1
| `-- my_plugin.fish
`-- man
`-- man1
`-- my_plugin.1
```
## DEPENDENCIES
@ -49,7 +49,7 @@ your_plugin
CTRL^D
```
Plugins may also define completions using `complete(1)` and provide documentation in the form of `man(1)` pages.
Plugins may also define completions using `complete`(1) and provide documentation in the form of `man`(1) pages.
## EXAMPLE
@ -93,7 +93,7 @@ end
^C
```
* Add basic documentation. Fisherman uses standard manual pages for displaying help information. There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn(1)`. For this example, type will do:
* Add basic documentation. Fisherman uses standard manual pages for displaying help information. There are utilities that can help you generate man pages from other text formats, such as Markdown. One example is `ronn`(1). For this example, type will do:
```fish
mkdir -p man/man1
@ -131,7 +131,6 @@ wtc
## SEE ALSO
man(1)<br>
complete(1)<br>
fisher help commands<br>
fisher help fishfile<br>
`man`(1), `complete`(1)<br>
`fisher help commands`<br>
`fisher help fishfile`<br>

View file

@ -3,13 +3,13 @@ fisher-tour(7) -- Fisherman Tour
## DESCRIPTION
Fisherman is a blazing fast, modern plugin manager for `fish(1)`.
Fisherman is a blazing fast, modern plugin manager for `fish`(1).
Fisherman runs virtually no initialization code, making it as fast as no Fisherman. The cache mechanism lets you query the index offline and enable or disable plugins as you wish.
Fisherman runs virtually no initialization code, making it **as fast as no Fisherman**. The cache mechanism lets you query the index offline and enable or disable plugins as you wish.
Other features include dependency management, excellent test coverage, plugin search capabilities and full compatibility with Tackle, Oh My Fish! and Wahoo themes and plugins.
This document describes Fisherman features and their implementation details. For usage and command help see `fisher(1)`.
This document describes Fisherman features and their implementation details. For usage and command help see `fisher`(1).
## FLAT TREE
@ -39,7 +39,7 @@ With this in mind, it's possible to improve the slow shell start problem using a
The overhead of juggling multiple path hierarchies in a per-plugin basis yields no benefits as everything is shared inside the same scope.
Loading a path simply means adding the desired location to the `$fish_function_path` array. See also `functions(1)`.
Loading a path simply means adding the desired location to the `$fish_function_path` array. See also `functions`(1).
Here is a snapshot of an example Fisherman configuration path with a single plugin and prompt:
@ -47,16 +47,17 @@ Here is a snapshot of an example Fisherman configuration path with a single plug
$fisher_config
|-- cache/
|-- conf.d/
|-- |-- my_plugin.config.fish
| `-- <my_plugin>.config.fish
|-- fishfile
|-- functions/
| |-- my_plugin.fish
| |-- <my_plugin>.fish
| |-- fish_prompt.fish
| |-- fish_right_prompt.fish
| `-- fish_right_prompt.fish
|-- completions/
| |-- my_plugin.fish
|-- man/
|-- man1/
|-- my_plugin.1
| `-- <my_plugin>.fish
`-- man/
`-- man1/
`-- <my_plugin>.1
```
If you are already familiar in the way Fish handles your user configuration, you will find the above structure similar to `$XDG_CONFIG_HOME/fish`. See `Initialization Files` in `help fish` to learn more about fish configuration.
@ -170,7 +171,7 @@ Fisherman allows a high level of configuration using `$fisher_*` variables. You
You can also extend Fisherman by adding new commands and ship them as plugins. Fisherman automatically adds completions to *commands* based in the function *description* and usage help if provided. See `fisher help help` and `fisher help commands`.
To add completions to standalone utility plugins, use `complete(1)`.
To add completions to standalone utility plugins, use `complete`(1).
### CLI
@ -178,13 +179,13 @@ If you are already familiar with other UNIX tools, you'll find Fisherman command
Most commands read the standard input by default when no options are given and produce easy to parse output, making Fisherman commands ideal for plumbing and building upon each other.
Fisherman also ships with a CLI options parser and a job spinner you can use to implement your own CLIs. See `getopts(1)` and `spin(1)`.
Fisherman also ships with a CLI options parser and a job spinner you can use to implement your own CLIs. See `getopts`(1) and `spin`(1).
## COMPATIBILITY
Fisherman supports Oh My Fish! themes and plugins, but some features are turned off by default for performance reasons.
Oh My Fish! evaluates every *.fish* file inside the root directory for every plugin installed during shell start. This is necessary in order to load any existing `init` event functions and immediately invoke them using fish `emit(1)`.
Oh My Fish! evaluates every *.fish* file inside the root directory for every plugin installed during shell start. This is necessary in order to load any existing `init` event functions and immediately invoke them using fish `emit`(1).
Since it is not possible to determine whether a file defines an initialization event without evaluating its contents first, Oh My Fish! sources all `*.fish` files and then emits events for each plugin.
@ -198,10 +199,8 @@ This plugin also adds definitions for some of Oh My Fish! Core Library functions
## SEE ALSO
fisher(1)<br>
fisher help<br>
fisher help config<br>
fisher help plugins<br>
fisher help commands<br>
spin(1)<br>
getopts(1)<br>
`fisher`(1), `spin`(1), `getopts`(1)<br>
`fisher help`<br>
`fisher help config`<br>
`fisher help plugins`<br>
`fisher help commands`<br>