docs: Build index, tutorial and faq as man pages

This was clearly intended for index, but because it was called "fish"
it was overwritten by the "fish" command man page.

I also added the tutorial and faq. Both of those might not be *ideal*
as man pages (the tutorial makes references to colors that won't show
up), but it's better to provide them than not.

Hat-tip to @wwared

See #5521.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-06-23 16:13:47 +02:00
parent 8f3a0dcc8b
commit e921bd60c3
2 changed files with 6 additions and 1 deletions

View File

@ -16,6 +16,7 @@
- `string replace` had an additional round of escaping in the replacement (not the match!), so escaping backslashes would require `string replace -ra '([ab])' '\\\\\\\$1' a`. A new feature flag `string-replace-fewer-backslashes` can be used to disable this, so that it becomes `string replace -ra '([ab])' '\\\\$1' a` (#5556).
- Some parser errors did not set `$status` to non-zero. This has been corrected (b2a1da602f79878f4b0adc4881216c928a542608).
- `string` has a new `collect` subcommand that disables newline-splitting on its input. This is meant to be used as the end of a command substitution pipeline to produce a single output argument potentially containing internal newlines, such as `set output (some-cmd | string collect)`. Any trailing newlines are trimmed, just like `"$(cmd)"` substitution in sh. It also supports a `--no-trim-newlines` flag to disable trailing newline trimming, which may be useful when doing something like `set contents (cat filename | string collect -N)` (#159).
- More of the documentation, including the tutorial, is now available as man pages as well.
### Syntax changes and new commands
- Brace expansion now only takes place if the braces include a "," or a variable expansion, so things like `git reset HEAD@{0}` now work (#5869).

View File

@ -177,7 +177,11 @@ def get_command_description(path, name):
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "fish", "fish-shell Documentation", [author], 1)]
man_pages = [
(master_doc, "fish-doc", "fish-shell Documentation", [author], 1),
("tutorial", "fish-tutorial", "fish-shell tutorial", [author], 1),
("faq", "fish-faq", "fish-shell faq", [author], 1),
]
for path in sorted(glob.glob("cmds/*")):
docname = strip_ext(path)
cmd = os.path.basename(docname)