From 4566ee083a4fb6982d015f626ca4195edcfdb791 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Sat, 27 Feb 2016 10:08:32 +0800 Subject: [PATCH] [#129] Beautify man pages --- man/man1/fisher-help.md | 19 ++++++++--------- man/man1/fisher-install.md | 36 +++++++++++++++---------------- man/man1/fisher-search.md | 14 +++++------- man/man1/fisher-uninstall.md | 4 ++-- man/man1/fisher-update.md | 12 +++++------ man/man1/fisher.md | 8 +++---- man/man1/getopts.md | 4 ++-- man/man5/fisher-fishfile.md | 4 ++-- man/man7/fisher-commands.md | 7 +++--- man/man7/fisher-config.md | 4 ++-- man/man7/fisher-faq.md | 8 +++---- man/man7/fisher-plugins.md | 23 ++++++++++---------- man/man7/fisher-tour.md | 41 ++++++++++++++++++------------------ 13 files changed, 88 insertions(+), 96 deletions(-) diff --git a/man/man1/fisher-help.md b/man/man1/fisher-help.md index 6cfbc44..715de93 100644 --- a/man/man1/fisher-help.md +++ b/man/man1/fisher-help.md @@ -3,7 +3,7 @@ fisher-help(1) -- Show Help ## SYNOPSIS -fisher `help` [*keyword*] [`--all`] [`--guides`] [`--usage`[=*command*]] [`--help`]
+fisher `help` [*keyword*] [`--all`] [`--guides`] [`--usage`[=*command*]] [`--help`]
## USAGE @@ -15,19 +15,19 @@ fisher `help` `--usage`=[*command*]
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)
-fisher(1)
+`man`(1), `fisher`(1) diff --git a/man/man1/fisher-install.md b/man/man1/fisher-install.md index 4575f58..a892630 100644 --- a/man/man1/fisher-install.md +++ b/man/man1/fisher-install.md @@ -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)
-fisher help config
-fisher help update
-fisher help uninstall
+`fisher`(1)
+`fisher help config`
+`fisher help update`
+`fisher help uninstall`
diff --git a/man/man1/fisher-search.md b/man/man1/fisher-search.md index 810fcc2..ea84d75 100644 --- a/man/man1/fisher-search.md +++ b/man/man1/fisher-search.md @@ -20,16 +20,12 @@ fisher `search` *query*
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)
-fisher help plugins
+`fisher`(1)
+`fisher help plugins`
diff --git a/man/man1/fisher-uninstall.md b/man/man1/fisher-uninstall.md index ab525d1..5ec228f 100644 --- a/man/man1/fisher-uninstall.md +++ b/man/man1/fisher-uninstall.md @@ -42,5 +42,5 @@ fisher --list | fisher uninstall --force ## SEE ALSO -fisher(1)
-fisher help plugins
+`fisher`(1)
+`fisher help plugins`
diff --git a/man/man1/fisher-update.md b/man/man1/fisher-update.md index 47c0e0c..5f3a661 100644 --- a/man/man1/fisher-update.md +++ b/man/man1/fisher-update.md @@ -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)
-fisher help plugins
+`fisher`(1)
+`fisher help plugins`
diff --git a/man/man1/fisher.md b/man/man1/fisher.md index 1399f8a..07697b4 100644 --- a/man/man1/fisher.md +++ b/man/man1/fisher.md @@ -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 ` 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
+`fisher help tour`
diff --git a/man/man1/getopts.md b/man/man1/getopts.md index b984d9f..24579e7 100644 --- a/man/man1/getopts.md +++ b/man/man1/getopts.md @@ -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 diff --git a/man/man5/fisher-fishfile.md b/man/man5/fisher-fishfile.md index 998da66..8265311 100644 --- a/man/man5/fisher-fishfile.md +++ b/man/man5/fisher-fishfile.md @@ -37,5 +37,5 @@ To understand this behavior, it helps to recall the shell's single scope for fun ## SEE ALSO -fisher(1)
-fisher help config
+`fisher`(1)
+`fisher help config`
diff --git a/man/man7/fisher-commands.md b/man/man7/fisher-commands.md index 4be8596..c1ff609 100644 --- a/man/man7/fisher-commands.md +++ b/man/man7/fisher-commands.md @@ -59,7 +59,6 @@ end ## SEE ALSO -fisher(1)
-fisher help tour
-funcsave(1)
-fisher help plugins
+`fisher`(1), `funcsave`(1)
+`fisher help tour`
+`fisher help plugins`
diff --git a/man/man7/fisher-config.md b/man/man7/fisher-config.md index 2e07b98..d00b6f5 100644 --- a/man/man7/fisher-config.md +++ b/man/man7/fisher-config.md @@ -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` diff --git a/man/man7/fisher-faq.md b/man/man7/fisher-faq.md index fbb90a6..adeb615 100644 --- a/man/man7/fisher-faq.md +++ b/man/man7/fisher-faq.md @@ -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 `. 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 `. The following guides are also available: fisher help `faq`: Fisherman FAQ
fisher help `tour`: Fisherman Tour
@@ -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`. diff --git a/man/man7/fisher-plugins.md b/man/man7/fisher-plugins.md index b67fd3b..1bb768d 100644 --- a/man/man7/fisher-plugins.md +++ b/man/man7/fisher-plugins.md @@ -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)
-complete(1)
-fisher help commands
-fisher help fishfile
+`man`(1), `complete`(1)
+`fisher help commands`
+`fisher help fishfile`
diff --git a/man/man7/fisher-tour.md b/man/man7/fisher-tour.md index 1116f3c..c49a0b6 100644 --- a/man/man7/fisher-tour.md +++ b/man/man7/fisher-tour.md @@ -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 +| `-- .config.fish +|-- fishfile |-- functions/ -| |-- my_plugin.fish +| |-- .fish | |-- fish_prompt.fish -| |-- fish_right_prompt.fish +| `-- fish_right_prompt.fish |-- completions/ -| |-- my_plugin.fish -|-- man/ - |-- man1/ - |-- my_plugin.1 +| `-- .fish +`-- man/ + `-- man1/ + `-- .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)
-fisher help
-fisher help config
-fisher help plugins
-fisher help commands
-spin(1)
-getopts(1)
+`fisher`(1), `spin`(1), `getopts`(1)
+`fisher help`
+`fisher help config`
+`fisher help plugins`
+`fisher help commands`