Commit graph

1247 commits

Author SHA1 Message Date
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
594d51e7eb Add a separate --profile-startup option to profile startup
This goes to a separate file because that makes option parsing easier
and allows profiling both at the same time.

The "normal" profile now contains only the profile data of the actual
run, which is much more useful - you can now profile a function by
running

   fish -C 'source /path/to/thing' --profile /tmp/thefunction.prof -c 'thefunction'

and won't need to filter out extraneous information.
2021-01-29 20:46:34 +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
ca3d226659 docs: Fix TOC text and put them in a div
This allows us to flex them together, so now you get one column on the
left with the title "Documents" and one on the right saying
"Sections" on narrow screens.

On wide screens it doesn't say "Table Of Contents" twice.

This should make it clearer
2021-01-27 22:02:35 +01:00
Fabian Homborg
3d180b7c50 docs: Make TOC appear first on narrow screens
This used to put the TOC last, which is the last place you'd want it.

It's not perfect and we do some hacky layoutery to achieve it, but it
should generally be usable.
2021-01-27 21:53:24 +01:00
Fabian Homborg
711fa31871 docs: Remove broken footnote
Oops!
2021-01-27 18:25:46 +01:00
Fabian Homborg
fc5f7975a6 docs: Make tables scrollable on overflow
This makes the *tables* themselves scrollable, not the section div
they are in, which means the section doesn't scroll along with
them (it's already reflowed).
2021-01-27 17:56:24 +01:00
Fabian Homborg
dd64035d23 docs: Some adjustments
Rewordings, :ref: links, typos
2021-01-27 17:39:09 +01:00
Fabian Homborg
4a7ce4f51c docs: More line-length fixes 2021-01-26 16:15:38 +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
d5ce648e10 docs/theme: Indent
Just do what emacs does, I don't like any of the available css
autoformatters (and we don't use it enough for that to matter)
2021-01-26 09:19:47 +01:00
Fabian Homborg
1e0ac9fa77 docs/theme: Remove prefixed boxshadow
See https://caniuse.com/css-boxshadow

TL;DR: It's supported by everything, the unprefixed version was added
to Firefox *4*.
2021-01-26 09:18:07 +01:00
Fabian Homborg
75f197b28e docs/theme: Add bottom margin
This makes it look like it's a page on top of the background gradient
2021-01-26 09:10:42 +01:00
Fabian Homborg
d4e76f5c5a docs/theme: Remove a bit of padding 2021-01-25 23:02:38 +01:00
Fabian Homborg
dc552fa0ab docs/theme: Make sidebar border less intrusive
Only on the right, much lighter, no radius
2021-01-25 22:59:30 +01:00
Fabian Homborg
651259e794 docs/theme: Fix padding when the searchbox is last
See e.g. the commands page - there's no separate TOC, so the searchbox
almost runs into the border
2021-01-25 22:55:29 +01:00
Fabian Homborg
117e663efe docs/theme: Remove horizontal scrolling on small screens
This clips overflowing padding/margins and thereby removes
non-"content" that's just off-screen, making the site scrollable.

The exception here is for tables - we allow scrolling the *section*
divs for those (because I have no idea how to only make the <table>
scrollable), if necessary of course.
2021-01-25 22:24:28 +01:00
Fabian Homborg
c39c985512 docs/theme: Limit fmain width
This causes it to be centered when the screen is large
2021-01-25 21:52:07 +01:00
Fabian Homborg
159c2aae1f docs/theme: Fix padding on small screens
This had the text overflowing the screen.

Now it should center nicely.
2021-01-25 21:34:42 +01:00
Fabian Homborg
5b366b9cb5 docs/tutorial: Mention alias
This came up online - here we exclaim that fish has no aliases (which
is true), but then in the main docs we explain that you can use
`alias` to make something (which is also true).

Add a foot note explaining the apparent contradiction.
2021-01-25 19:11:00 +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
e2fb645c0c docs: Don't add rst sources
This used to add a "_sources" directory with all the ".rst" files
renamed to ".rst.txt".

That took up ~0.7M of the total size for very little use.
2021-01-16 19:33:12 +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
7fc72e46b3 docs: Add more about $PATH being imported to the tutorial
Fixes #7539.
2021-01-09 22:45:03 +01:00
Fabian Homborg
b489137fa9 docs: Link to fish_key_reader 2021-01-09 13:13:48 +01:00
David Adam
21f46181d9 string match: reword the named capture group documentation 2021-01-08 21:16:07 +08:00
David Adam
a0764ef3d2 docs: note limits on parameter expansion from #7226
introduced in 594a6a3
2021-01-07 15:44:01 +08:00
Fabian Homborg
cb9029944e docs: Remove margin entirely on small screens
This removes the margin with the background gradient and such
completely once the screen falls under 700px. In those cases we really
don't want to waste space, and having just a weird blue bit above the
docs looks weirder than not having anything.
2021-01-04 21:53:30 +01:00
Fabian Homborg
6eeb8861e7 Add exit bind function
Currently binding `exit` to a key checks too late that it's exitted,
so it leaves the shell hanging around until the user does an execute
or similar.

As I understand it, the `exit` builtin is supposed to only exit the
current "thread" (once that actually becomes a thing), and the
bindings would probably run in a dedicated one, so the simplest
solution here is to just add an `exit` bind function.

Fixes #7604.
2021-01-04 09:45:34 +01:00
Ilan Cosman
18940ea086
Remove dunderscores from __fish_status_to_signal (#7597)
* Remove dunderscores from __fish_status_to_signal

* Document fish_status_to_signal

* CHANGELOG: Add fish_status_to_signal

* Add string join to fish_status_to_signal documentation example
2021-01-03 15:15:57 +01: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
Fabian Homborg
b43a8688fe docs: Correct argparse on short- options
These aren't exposed as variables at all, so it's just entirely
vestigial now and only kept for backwards compatibility.
2021-01-01 14:22:22 +01:00
Fabian Homborg
57d23c390b docs: Reword argparse a bit
In particular use "variable" instead of "var".
2021-01-01 14:03:00 +01:00
Fabian Homborg
7ea8e20623
argparse: Make short flag names optional (#7585)
It was always a bit ridiculous that argparse required `X-longflag` if
that "X" short flag was never actually used anywhere.

Since the short letter is for getopt's benefit, we can hack around
this with our old friend: Unicode Private Use Areas.

We have a counter, starting at 0xE000 and going to 0xF8FF, that counts
up for all options that don't have a short flag and provides one. This
gives us up to 6400 long-only options.

6.4K should be enough for everybody.
2021-01-01 11:37:25 +01: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
elpres
aaeb7d107c Fixed sentence in fish_hg_prompt docs 2020-12-28 19:39:27 +01: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