Commit Graph

228 Commits

Author SHA1 Message Date
Fabian Homborg
5aed0bbf88 docs: Remove underline for whitespace
This made it look like code was `echo_Hello_World` instead of `echo
Hello World`.

See #5696.

[ci skip]
2019-04-09 13:57:36 +02:00
Fabian Homborg
c2259cbb86 docs: Fix typo
Also removes a warning.

[ci skip]
2019-04-09 13:47:54 +02:00
ridiculousfish
1fb05d8fa0 Add fish specific css to docs 2019-04-08 19:13:58 -07:00
ridiculousfish
e85cb25883 Switch to fish_indent based syntax highlighting in sphinx docs 2019-04-08 19:11:22 -07:00
ridiculousfish
5b2c741f6c Add fish_indent_lexer.py
This is a pygments lexer that shells out to fish_indent
2019-04-08 19:09:53 -07:00
Fabian Homborg
4d66c7896f docs: Fix some more formatting
One monster paragraph and two lists that weren't recognized as such.

RsT loves empty lines.

[ci skip]
2019-04-06 23:38:07 +02:00
Fabian Homborg
a447878cd7 docs: Remove &foo; escapes
I always hated these.

[ci skip]
2019-04-06 23:33:07 +02:00
Fabian Homborg
c4d0177d81 docs: Put some more important variables first
This section was linked when talking about $PATH, and $PATH is much
more important than $fish_color_something and $fish_emoji_width.

[ci skip]
2019-04-06 23:29:05 +02:00
Fabian Homborg
235266894b docs: Fix reference to FAQ
This adds a reference to one specific FAQ, so it adds a label for that
one question. It does not add the rest, because they currently aren't
linked. If you add a reference to an FAQ, you should add the label as
well.

[ci skip]
2019-04-06 23:23:48 +02:00
Fabian Homborg
f1614a995a docs: Reword commandline -f
We don't refer to "readline functions" anywhere else, and "injecting"
them "into the reader" is an overly jargony way of expressing it that
only makes sense to someone familiar with the internals. And even then
the term "readline" is already taken by the "readline" library, used
by bash et al, but not by us.

So we pick the term "input functions", like we did in bind.

See https://stackoverflow.com/questions/55542839/what-does-commandline-f-repaint-in-fish-shell/55543411#55543411.

[ci skip]
2019-04-06 20:39:16 +02:00
Fabian Homborg
21ef9f5150 docs: Remove fish_vi_mode documentation
This has been deprecated for quite a while, no need to keep the docs around.

[ci skip]
2019-04-05 14:09:41 +02:00
Fabian Homborg
357a572b43 docs/index: Document repaint-mode
This was only mentioned in passing in the bind docs.

[ci skip]
2019-04-05 14:08:58 +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
99dd6d7394 Let repaint-mode act like a repaint if no fish_mode_prompt exists
Otherwise I'm pretty sure we'd get complaints from people who use a
mode-indicator elsewhere in their prompts.
2019-04-01 16:04:14 +02:00
Fabian Homborg
8ff866b26b Add repaint-mode bind function
If we switch the bind mode, we add a "force-repaint" there just to
redraw the mode indicator.

That's quite wasteful and annoying, considering that sometimes the prompt can take
half a second.

So we add a "repaint-mode" function that just reexecutes the
mode-prompt and uses the cached values for the others.

Fixes #5783.
2019-04-01 15:59:39 +02:00
Fabian Homborg
0d72912641
Expand abbr explicitly (#5762)
* Add "expand-abbr" bind function

This can be used to explictly allow expanding abbreviations.

* Make expanding abbr explicit

NOTE: This accepts them for space only, we currently also do it for \n
and \r.

* Remove now dead code

We no longer trigger an abbr implicitly, so we can remove the code
that does it.

* Fix comment

[ci skip]
2019-04-01 15:59:15 +02:00
Fabian Homborg
95ab71c456 docs: Another bit of dehtml-izing
[ci skip]
2019-03-31 12:00:27 +02:00
Fabian Homborg
6c234a7385 docs: Remove a table
This was html, and I don't think it helped all that much, so let's
remove it instead of translating to rst.

[ci skip]
2019-03-31 11:56:12 +02:00
Fabian Homborg
eb3bbb1360 docs: Fix example link 2019-03-31 11:50:28 +02:00
Fabian Homborg
ac61d3f34d docs: More references
Including two more href.
2019-03-31 11:48:35 +02:00
Fabian Homborg
127c0e9764 docs: Fix remaining references
Fixes #5775.
2019-03-31 11:35:02 +02:00
Fabian Homborg
e2cf10dd4f docs: More command labels
[ci skip]
2019-03-31 11:28:13 +02:00
Fabian Homborg
bda3fb7740 docs: Fix a few wrong verbatim blocks
Wrong number of backticks.

[ci skip]
2019-03-31 11:25:07 +02:00
Fabian Homborg
86d4574222 docs: Use more command labels 2019-03-31 11:24:04 +02:00
Fabian Homborg
cb94dd4d30 docs: Use command labels
[ci skip]
2019-03-31 11:15:57 +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
c693687812 docs: Add missing >
"Anonymous hyperlink" strikes again!

[ci skip]
2019-03-31 10:55:17 +02:00
Fabian Homborg
0c4580d874 docs: Fix moar reference syntax 2019-03-30 20:44:07 +01:00
Fabian Homborg
203927245d docs: Fix reference syntax
Fixes #5776.

[ci skip]
2019-03-30 20:28:09 +01:00
Fabian Homborg
03a6fb4a69 docs/license: Fix "anonymous hyperlink" warning
Apparently an anonymous hyperlink looks like `__something__`.

I had to find this by deleting parts of the document and building to
narrow it down until I had the line, because sphinx wouldn't give a
line number.

See #5696.

[ci skip]
2019-03-29 21:13:10 +01:00
Fabian Homborg
82d55aeb84 docs: Fix warnings
This was:

- Some `` mismatches - it's "``something``", not "``something`".

- Some "explicit targets", which IMHO are quite a misfeature - `word
  <link>`_ has to be unique, which I don't see a usecase for. Instead
  use `word <link>`__, with a double-underscore at the end.

- One case of `||` which I just removed

See #5696.

[ci skip]
2019-03-29 21:07:36 +01:00
Fabian Homborg
191b74df6f docs: Fix some sphinx errors
See #5696.

[ci skip]
2019-03-29 20:55:28 +01:00
Fabian Homborg
3912d86ed8 docs/cmds/bind: Fix synopsis 2019-03-29 20:16:10 +01:00
Fabian Homborg
408c555bd6 docs/cmds/alias: Fix emphasis 2019-03-29 20:15:59 +01: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
ebc0bee404 docs: Correct link
We're gonna have a bunch of these, aren't we?

[ci skip]
2019-03-29 19:09:57 +01:00
Fabian Homborg
a361d987f8 docs: Add toctree back
Apparently there must indeed be a toctree somewhere in the document to
get the links to the other docs to show up.

Even a ":hidden:" toctree doesn't help - that just leads to an empty
toc in the sidebar (no idea yet where that's defined!).

I've added it to the end so it's not that weird "Commands" section in
the middle.

[ci skip]
2019-03-29 19:08:25 +01:00
Fabian Homborg
6cf61d5235 docs/fish_git_prompt: Fix formatting
Sphinx likes empty lines before lists.

Also give variable names the ``treatment``.

[ci skip]
2019-03-28 22:11:28 +01:00
Fabian Homborg
c94fe0f8c9 docs/fish_git_prompt: Document default settings
This should help with interpreting the results.

All this is quite convoluted, especially with defaults dependent on
other settings.

[ci skip]
2019-03-28 21:16:05 +01:00
Fabian Homborg
4e7795217d docs: Replace @cursor_key
Should be the last of them.

See #5696.

[ci skip]
2019-03-27 12:44:10 +01:00
Fabian Homborg
6a9079899d docs: Add an annotated completion example
It's not _perfect_, but should hopefully ease the introduction a
teensy bit.

We use `timedatectl` because it's a reasonably simple command that
still uses subcommands and some generated candidates.

[ci skip]
2019-03-27 12:40:38 +01:00
Fabian Homborg
b86200938f Always use "." for cd
Nobody doesn't want to use $PWD to cd, so if $CDPATH does not include
it that was a mistake.

Bash also appends "." here.

Fixes #4484.
2019-03-26 10:11:36 +01:00
Fabian Homborg
99d77c6049 docs: Replace &.arr; markup with unicode arrows
This is still missing the @cursor_keys bit.

See #5696.

[ci skip]
2019-03-24 20:03:52 +01:00
Fabian Homborg
848d538f08 docs: Replace @key markup with :kbd:
The best I could find. It doesn't currently appear to render in the
html, but it's better than showing `@key{thing}`.
2019-03-24 19:59:23 +01:00
Fabian Homborg
8837d17910 docs: Remove weird Commands subsection
This included another copy of the TOC in the middle of the index page
and called it "Commands"?

See #5696.

cc @ridiculousfish

[ci skip]
2019-03-24 19:51:27 +01:00
Fabian Homborg
295286b184 docs: Fix remaining "\subsection" markup
See #5696.

[ci skip]
2019-03-24 19:44:56 +01:00
GReagle
277a94c118 FAQ: how to check whether variable is defined or not empty (#5732)
* FAQ: how to check whether variable is defined or not empty

* FAQ: how to check whether variable is not empty: include test in answer
2019-03-21 10:24:08 +01:00
Fabian Homborg
f8b88d5b98 docs/fish_git_prompt: Better document variables
More accurate, also the code example can now be copy-pasted.

[ci skip]
2019-03-19 21:07:49 +01:00
Fabian Homborg
69abbd7b2a docs: Mention $__fish_x_dir in autoloading chapter
That's what we want people to use instead of hardcoding
"/usr/share/fish", because that would break the code on other systems.

[ci skip]
2019-03-18 21:10:18 +01:00
Fabian Homborg
9bd398b9fb Document features more
This adds string-replace-fewer-backslashes, but also explains the
feature flag system a bit more.

[ci skip]
2019-03-15 15:31:21 +01:00
Fabian Homborg
e7a964fdfa [count] Allow counting lines from stdin
As a simple replacement for `wc -l`.

This counts both lines on stdin _and_ arguments.

So if "file" has three lines, then `count a b c < file` will print 6.

And since it counts newlines, like wc, `echo -n foo | count` prints 0.
2019-03-15 14:31:36 +01:00
Fabian Homborg
4a67d9015b docs/command: Make it clearer that -a needs a commandname
Fixes #5107.

[ci skip]
2019-03-14 21:07:10 +01:00
hyperfekt
51cc03ca75 reflect #1912 in documentation 2019-03-13 10:10:38 +01:00
Fabian Homborg
6239c94fd4 docs/index: Fix <a href> links
These don't work with sphinx, so we replace them with its style.

See #5696.

[ci skip]
2019-02-25 21:52:44 +01:00
Fabian Homborg
9a1cd9c8ce docs/index: Fix links
See #5696.

[ci skip]
2019-02-25 21:29:39 +01:00
zabereer
2c8abdf5cb add $pipestatus support 2019-02-24 21:46:52 -08:00
Collin Styles
fa5d19a702 Fix broken link on index page 2019-02-24 20:22:56 -08:00
ridiculousfish
a1f122f603 Add license to sphinx docs build 2019-02-24 18:23:42 -08:00
ridiculousfish
2d75ab8e9b Add FAQ to sphinx docs build 2019-02-24 18:23:33 -08:00
ridiculousfish
db90f421c0 Add design doc to Sphinx docs build 2019-02-24 18:22:52 -08:00
ridiculousfish
6241bd8453 Add tutorial to sphinx docs build 2019-02-24 18:22:41 -08:00
ridiculousfish
6cd8856484 Add the vcs prompts to sphinx docs 2019-02-24 18:21:36 -08:00
ridiculousfish
9a35df059a Clean up fish_breakpoint_prompt sphinx docs 2019-02-24 18:15:48 -08:00
ridiculousfish
2b89cbc678 Incorporate sabine's index changes into sphinx docs
Adds:
f6974e5a76
20c51b7da9
2019-02-24 18:15:48 -08: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
3debfe7534 Break out commands into its own file 2019-02-24 18:15:48 -08:00
ridiculousfish
fb75d0f848 Parse out command descriptions from files for Sphinx man pages
sphinx expects that the description for a command (as appearing in its man
page) be provided in conf.py, not in the rst file itself. LLVM handles this
with some custom Python code that parses it out of the file. Do the same
thing in fish.
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
ridiculousfish
cb045d5e6a Migrate index.rst to reStructuredText 2019-02-24 18:15:48 -08:00
ridiculousfish
c46f02e01e Initial sphinx file import 2019-02-24 18:15:23 -08:00