Commit Graph

24 Commits

Author SHA1 Message Date
Johannes Altmanninger
08eac28bd8 Add individual documentation pages for string's subcommands
This adds string-x.rst for each subcommand x of string. The main page
(string.rst) is not changed, except that examples are shown directly after
each subcommand.  The subcommand sections in string.rst are created by
textual inclusion of parts of the string-x.rst files.

Subcommand man pages can be viewed with either of:

```
man string collect
man string-collect
string collect <press F1 or Alt-h>
string collect -h
```

While `string -h ...` still prints the full help.

Closes #5968
2019-11-07 09:54:25 +01:00
David Adam
02d82dcf85 docs: update all command synopsis formatting
Adds synopses for those commands missing them.

Moves all synopsis sections to code blocks. This improves the appearance, although highlighting as
fish code may not be the ideal appearance.
2019-09-17 17:59:04 +08:00
David Adam
605885f851 docs: whitespace cleanup in source
Fixes some lint warnings.
2019-09-17 17:28:19 +08:00
Lily Ballard
181e44d331 Invert the flag for string collect
Instead of requiring a flag to enable newline trimming, invert it so the
flag (now `--no-trim-newlines`) disables newline trimming. This way our
default behavior matches that of sh's `"$(cmd)"`.

Also change newline trimming to trim all newlines instead of just one,
again to match sh's behavior.
2019-06-16 16:40:14 -07:00
Lily Ballard
b41e5cbbb7 Add string collect
The `string collect` subcommand behaves quite similarly in practice to
`string split0 -m 0` in that it doesn't split its output, but it also
takes an optional `--trim-newline` flag to trim a single trailing
newline off of the output.

See issue #159.
2019-06-16 15:51:57 -07:00
Fabian Homborg
257c72d8be Document string split superpowers more
[ci skip]
2019-05-19 19:40:48 +02:00
Fabian Homborg
1377f71331 docs: Remove some more html
See #5696.

[ci skip]
2019-04-30 12:56:30 +02:00
Fabian Homborg
d8f922fd70 docs: Remove <outp> tags
fish_indent_lexer formats lines not starting with a prompt indicator
as output, as long as there is a prompt indicator elsewhere.

So these tags are useless and wrong.

See #5696.

[ci skip]
2019-04-30 12:44:55 +02:00
Fabian Homborg
e084d097d5 docs: Remove <asis> markup
This isn't needed anymore.

[ci skip]
2019-04-26 19:25:30 +02:00
Fabian Homborg
c2259cbb86 docs: Fix typo
Also removes a warning.

[ci skip]
2019-04-09 13:47:54 +02:00
Fabian Homborg
318fe3c046 docs/string: Replace doesn't do globs
As a bit of weirdness in string's design, replace does literal
matching (`*` aren't expanded) by default, not globs.

[ci skip]
2019-04-03 19:49:38 +02:00
Fabian Homborg
aa3dff098c docs/string: Add paragraph on comparison with unix tools
[ci skip]
2019-04-02 12:46:23 +02:00
Fabian Homborg
cf9b8fa3fa docs: Add labels to all commands
This allows us to use :ref: references, which don't require hardcoding
it as html

[ci skip]
2019-03-31 11:05:33 +02:00
Fabian Homborg
21bac8428e docs/cmds/string: Fix lists
sphinx _really_ likes its empty lines before lists!

[ci skip]
2019-03-29 20:12:28 +01:00
Fabian Homborg
b8570a9e8a docs/cmds/string: Improve synopsis
This both formats it as a code-block, and adds the synopsis of each
subcommand to the corresponding section again so you don't need to
scroll back-and-forth so much.

[ci skip]
2019-03-29 20:11:23 +01:00
Fabian Homborg
295286b184 docs: Fix remaining "\subsection" markup
See #5696.

[ci skip]
2019-03-24 19:44:56 +01:00
ridiculousfish
d5e0392964 Incorporate most new doc changes since branch
Adds most documentation changes since 72c0213d42
2019-02-24 18:15:48 -08:00
ridiculousfish
c8dc306b18 Fix command section separator line lengths 2019-02-24 18:15:48 -08:00
ridiculousfish
0e936198db Switch backticks to double backticks for rst compatibility 2019-02-24 18:15:48 -08:00
ridiculousfish
2a002a4ba1 Switch \fish sections to rst format 2019-02-24 18:15:48 -08:00
ridiculousfish
c33d1a217c Convert \\subsection sections into rst format 2019-02-24 18:15:48 -08:00
ridiculousfish
256c2dadee Migrate the 'synopsis' sections to .rst format 2019-02-24 18:15:48 -08:00
ridiculousfish
c213882511 Switch command docs from \section to reStructuredText 2019-02-24 18:15:48 -08:00
ridiculousfish
afd035f8cc Copy doc_src to sphinx_doc_src and add a TOC 2019-02-24 18:15:48 -08:00