Commit graph

127 commits

Author SHA1 Message Date
Fabian Homborg
6640f45913 docs: Use a separate top-level document for lAtEx
This screams about duplicate labels even *if this part isn't built!*

So we use another document that we ignore in other builders.

Blergh
2021-07-14 16:42:04 +02:00
Fabian Homborg
36d9e7b6d6 docs: In latex build, just concatenate the important docs
Instead of having a toctree after the "index", just append the
important documents directly. Having one pdf file with different
chapters and sections and such feels better.
2021-07-13 23:06:01 +02:00
Fabian Homborg
21f5032a55 docs: Don't speak of "initialization files"
The file is called "config.fish", not "init.fish". We'll call it
"configuration" now.

"Initialization" might be slightly more precise, but in an irritating
way.

Also some wording improvements to the section. In particular we now
mention config.fish *early*, before the whole shebang.
2021-05-28 20:49:57 +02:00
Fabian Homborg
0e771590e6 docs: Remove stray mention of the IRC channel
This was apparently missed in 1f976a5041.
2021-05-27 21:41:52 +02:00
Fabian Homborg
d5a30ed103 docs: Split off links to other pages into its own section
This is an attempt to make these more visible - the intro section
explains what this is, and then we mention where to go, and after that
we go into installation and stuff.

I don't think putting "where to go" *after* the installation
instruction is correct, but maybe it is? For the time being, we keep
the order as it is.
2021-05-18 22:53:13 +02:00
Fabian Homborg
c38f4980f9 docs: Some tweaks on initialization 2021-05-16 21:27:00 +02:00
Fabian Homborg
d5f9fc84dc docs: Remove "note that"
It's one of my verbal tics, and I don't want it.
2021-05-03 18:39:54 +02:00
Fabian Homborg
d9b212f60b docs: Move some more sections from index to language
These aren't a 100% *exact* fit, but they're mostly language features.
2021-04-16 18:06:33 +02:00
Fabian Homborg
f1d3e7a0db docs: Reorder ToC
Roughly the order I expect these to be used in.
2021-03-31 17:21:46 +02:00
Fabian Homborg
93eaa61294 Split up documentation
This breaks apart the massive "index" document into

1. An "index" document that explains how to install and set up fish
and links to the other documents
2. A "fish-language" document that describes the syntax and semantics
of the language
3. A "fish-interactive" document that describes how to use fish
interactively

No change to the content has been made, only the parts have been moved
from index and some of the formatting (links and header levels) were
fixed.

See #7348.
2021-03-27 15:44:17 +01:00
Fabian Homborg
58177ba091 docs: Replace all internal links with :ref:s
Unlike links, these are checked by sphinx and it complains if they
don't match.

Also they have a better chance of doing something useful in outputs
other than html.
2021-03-26 19:32:14 +01:00
Fabian Homborg
8e6cfa1311 docs: Explicity link a few more sections
This makes it easier to move them around.
2021-03-26 19:32:14 +01:00
Fabian Homborg
c96a07dc96 Revert "Prevent redirecting internal processes to file descriptors above 2"
FDs are inherited, and redirecting those is harmless, and forbidding
that is worse than allowing all.

Fixes #7769.

This reverts commit 11a373f121.
2021-03-03 22:26:33 +01:00
David Adam
39230978b3 docs: call the CHANGELOG "release notes" 2021-02-25 22:46:24 +08:00
ridiculousfish
11a373f121 Prevent redirecting internal processes to file descriptors above 2
The user may write for example:

    echo foo >&5

and fish would try to output to file descriptor 5, within the fish process
itself. This has unpredictable effects and isn't useful. Make this an
error.

Note that the reverse is "allowed" but ignored:

    echo foo 5>&1

this conceptually dup2s stdout to fd 5, but since no builtin writes to fd
5 we ignore it.
2021-02-20 16:16:45 -08:00
Fabian Homborg
b3626d48e7 Highlight keywords differently
This introduces a new variable $fish_color_keyword that will be used
to highlight keywords. If it's not defined, we fall back on
$fish_color_command as before.

An issue here is that most of our keywords have this weird duality of
also being builtins *if* executed without an argument or with
`--help`.

This means that e.g.

    if

is highlighted as a command until you start typing

    if t

and then it turns keyword.
2021-02-07 21:18:51 +01:00
Fabian Homborg
2faf814da4 docs: Point away from set -x
This is a common anti-pattern, we should try to get people to do `set -gx`.
2021-02-01 18:12:24 +01:00
Fabian Homborg
6442dc96d6 docs: Add a loops section to index
This was only in the tutorial - we really should improve the split here.
2021-01-31 13:15:03 +01:00
Fabian Homborg
7eb616b787 docs: Make some things subsections
E.g. autoloading and aliases are both about functions, variable scope
and overrides are both about variables.

It makes sense to group these together, and this might allow us to
collapse some of the TOC later.
2021-01-31 12:34:47 +01:00
Fabian Homborg
02c11e1db5 docs: Put variable expansion before command substitution
That's the order the parent section lists it in.
2021-01-31 12:30:20 +01:00
Fabian Homborg
892330b904 docs: Drop "Other features" header
This has two features now, there's no need to group it.
2021-01-31 11:59:43 +01:00
Fabian Homborg
00fc56f3e1 docs: Drop weird local table of contents from "Installation" section
This is about a page long, it doesn't need links.
2021-01-31 11:57:51 +01:00
Fabian Homborg
ad560e2b80 docs: Expand a bit on the alias/abbr thing
Also move abbr explanation to interactive use (as abbrs are purely an
interactive concept)

(also add an example to tilde expansion, not making a separate commit
for that)
2021-01-31 11:56:19 +01:00
Fabian Homborg
8e8349d714 docs: Unify job control
Remove the redundant "running multiple programs" section and merge the
"job control" and "background" sections.
2021-01-31 11:49:54 +01:00
Fabian Homborg
9fead046b5 docs: Explain the man/help split in the help section 2021-01-31 11:41:46 +01:00
Fabian Homborg
cf800db10a docs: Move things from "Other features" to "Interactive use"
These are interactive features, after all
2021-01-29 20:08:37 +01:00
Fabian Homborg
711fa31871 docs: Remove broken footnote
Oops!
2021-01-27 18:25:46 +01:00
Fabian Homborg
dd64035d23 docs: Some adjustments
Rewordings, :ref: links, typos
2021-01-27 17:39:09 +01:00
Fabian Homborg
cbc9de3663 docs: Make the lines in the code examples shorter
We should typically avoid scrolling even at max-width.

An exception here is the output of `functions` - this prints one very
long line, but it's really not important what's in there specifically,
it's just to illustrate the kind of output you'd get.
2021-01-26 09:29:58 +01:00
Fabian Homborg
b59cad3c5b
Merge pull request #7654 from mattdutson/intro-doc
More improvements to clarity and grammar of Introduction doc page
2021-01-25 19:08:19 +01:00
Fabian Homborg
5f93df240e Fish for bash users: Fix missing word and link it from index 2021-01-22 16:23:09 +01:00
Fabian Homborg
1285957703 docs: Add glob example to variable overrides
And clarify that it'll still run the same things
2021-01-17 10:31:23 +01:00
Fabian Homborg
e192066e98 Add $fish_handle_reflow to disable winch handler
Overriding event handlers is annoying.
2021-01-15 18:37:06 +01:00
Matthew Dutson
d079026ecc Merge branch 'master' into intro-doc 2021-01-12 17:37:16 -06:00
Matthew Dutson
480f7fdb37 Revise "Piping" section 2021-01-12 17:24:23 -06:00
Fabian Homborg
b489137fa9 docs: Link to fish_key_reader 2021-01-09 13:13:48 +01:00
David Adam
a0764ef3d2 docs: note limits on parameter expansion from #7226
introduced in 594a6a3
2021-01-07 15:44:01 +08:00
ridiculousfish
118f710e99 Allow fish_private_mode to change at runtime
Prior to this change, `fish_private_mode` worked by just suppressing
history outright. With this change, `fish_private_mode` can be toggled on
and off. Commands entered while `fish_private_mode` is set are stored but
in memory only; they are not written to disk.

Fixes #7590
Fixes #7589
2021-01-02 22:01:47 -08:00
ridiculousfish
43505f7077 Allow ** glob segments to match zero directories
Prior to this change, a glob like `**/file.txt` would only match
`file.txt` in subdirectories; the `**` must match at least one directory.
This is historical behavior.

With this change we move a little closer to bash's implementation by
allowing a literal `**` segment to match in the current directory. That
is, `**/foo` will match both `foo` and `bar/foo`, while `b**/foo` will
only match `bar/foo`.

Fixes #7222.
2020-12-28 23:51:18 -08:00
Matthew Dutson
0136db0a22 Revise through "Input/Output Redirection" section 2020-12-27 17:49:52 -07:00
Matthew Dutson
bc91a13ba3 Revise through "Quotes" section 2020-12-27 17:57:09 +01:00
Matthew Dutson
f3fee832d4 Revise through "Quotes" section 2020-12-26 14:45:48 -07:00
Fabian Homborg
39e1494c56 docs: A bit more on variables 2020-12-24 10:30:59 +01:00
Fabian Homborg
6aed132224 docs: More links to commands in index 2020-10-28 17:44:45 +01:00
Johannes Altmanninger
4081d58577 docs: use monospace for inline code snippets more consistently 2020-10-26 19:25:41 +01:00
Fabian Homborg
4bfda47449 Bind ctrl-r to search history if the commandline isn't empty
This is super cheesy.

One of the most common feature requests we get is "control-r must
search", even tho just using history-search-backward via e.g. up-arrow
is perfectly capable. The only real difference is that ctrl-r search
in other shells allows editing the search term by default, while we
stop the history search and edit the new commandline in those cases.

So, since the major problem is muscle-memory on ctrl-r,
let's just use that!

This makes ctrl-r do nothing on empty commandlines, and do
history-search-backward otherwise, so the basic flow of "press ctrl-r
to start history search, enter your search term, press ctrl-r to cycle
through matches" just works (except the first ctrl-r is useless and it
doesn't show anything).

See #602.
2020-10-23 13:42:54 +02:00
Charles Gould
f73ee30111 docs: Fix markup for code blocks 2020-10-10 21:49:33 +02:00
Fabian Homborg
d6d3abf59a Introduce $FISH_DEBUG and $FISH_DEBUG_OUTPUT variables
Same as the `--debug` and `--debug-output` options, can be enabled
when the option can't be passed, e.g. in linux shebangs.

Fixes #7359.
2020-09-28 17:46:37 +02:00
Johannes Altmanninger
16ae532368 Fix typos in docs 2020-09-25 19:33:01 +02:00
Fabian Homborg
7cac8886bf docs: Some more on argument handling
Reword and expand the list section, and add another explicitly on
argument handling.

Fixes #4630

[ci skip]
2020-09-23 18:48:05 +02:00