Commit Graph

13771 Commits

Author SHA1 Message Date
Fabian Homborg
005d3a5981 Enable strict-aliasing and implicit-fallthrough warnings
GCC needs to have the comment *right before* the case label... blergh
2021-01-29 18:23:30 +01:00
Fabian Homborg
4e8c0f757d complete: Don't require a parameter with --force-files
A classic fallthrough problem!

This is why I want to enable -Wimplicit-fallthrough
2021-01-29 18:23:29 +01:00
Johannes Altmanninger
062f24d91b builtin set: make slice index range optional, like in slice expansion
Expansion parses slices like "$PATH[1..2]", but so does "set" when assigning
"set PATH[1..2] . .".  Commit be06f842a ("Allow to omit indices in index
range expansions") forgot the latter.
2021-01-28 07:19:38 +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
Johannes Altmanninger
0ed7d67532 completions/git: minor cleanup 2021-01-27 07:31:54 +01:00
Johannes Altmanninger
085c1d2096 completions/git: avoid loading git-foo completions twice
We were soucing it manually, and implicitly via the `complete -C "git-foo "`
wrapper. Always use the latter, so fish knows that the completion is already
loaded.
2021-01-27 07:31:54 +01:00
Fabian Homborg
a78ec8c8cb webconfig: Use flexbox for the colorschemes
This had a classic float:left layout, which led to awkward gaps and
stuff.

Since what we want here is basically 100% exactly a flexbox, just use that.

Note: No flexbox for the prompts, atm, because having multiple of
those next to each other looks a bit weird.
2021-01-26 20:47:18 +01:00
Fabian Homborg
b722e9ae32 sample_prompts/sorin: Move the right prompt into the prompt function
Our old problem with fish_config
2021-01-26 19:23:59 +01:00
Fabian Homborg
4a7ce4f51c docs: More line-length fixes 2021-01-26 16:15:38 +01:00
Fabian Homborg
f78cbf79fc CHANGELOG: Make the important bits bold
Nicked from the old (old old old) changelog for fishfish Beta r1
2021-01-26 14:36:43 +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
4ac9924088 tests: Deactivate that one bind test that still keeps failing
This test has never failed for me in earnest, it's only when CI is too
slow that I've ever seen it fail.

So it's a net-negative and should be removed
2021-01-26 07:07:51 +01:00
Fabian Homborg
275534b1b3 read: Remove unused short options
This has both "m" and "B" in the short options but did nothing with
them, so it would assert() out.

Fixes #7659.
2021-01-26 07:06:25 +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
Johannes Altmanninger
09161761c1 Complete custom "git-foo" commands from "git foo"
Since #7075, git-foo.fish files are sourced when Git completions are loaded.
However, at least Cobra (CLI framework for Go) provides completions like

	complete git-foo ...

This means that completions are only offered when typing "git-foo <TAB>"
and not on "git foo <TAB>". Fix this by forwarding the completion requests.
Take care to only forward if there are actually completions for "git-foo",
to avoid adding filename completions.
2021-01-25 19:09:56 +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
8907606b07
completions/ps: Fix typo
Fixes #7657
2021-01-25 13:22:14 +01:00
Fabian Homborg
28f4f82246 completions/gem: Unbreak
See #7655.
2021-01-24 21:00:50 +01:00
Fabian Homborg
66932b74b2 completions/launchctl: Unbreak
These passed the description as part of the argument but didn't escape
them properly.

Instead, let's just use a description.

Fixes #7655.
2021-01-24 20:08:22 +01:00
Fabian Homborg
978559fdfa type: Add a few more tests 2021-01-24 15:57:23 +01:00
Fabian Homborg
baa9b21a6f type: Only print function path with "--path"
Fixes #7653.
2021-01-24 15:31:39 +01:00
Johannes Altmanninger
58df0bc051 __fish_print_pipestatus: remove fallback colors for missing arguments
The arguments were not optional because we use
"set -e argv[1 2 3 4 5]"
2021-01-24 14:28:14 +01:00
Wez Furlong
4b0152575e Enable OSC 7 when running in WezTerm
Over in https://github.com/wez/wezterm/issues/115#issuecomment-765869705 one of my users noted that fish had automatic OSC 7, but that it wasn't enabled under WezTerm.

You can detect WezTerm through the `$TERM_PROGRAM` environment.  In practical terms, all versions of wezterm in the wild support OSC 7 so a version check is not needed.

I'm not a fish user myself, but I did give the equivalent change to this a try on my Fedora 33 machine (it has an older version of fish).

I can see in this file that there's some stuff with `__fish_enable_focus` that you may also want to enable under wezterm; the escape sequence is supported as are panes, tabs and windows.
2021-01-23 18:10:32 +01:00
Fabian Homborg
3eff7b26bf __fish_print_pipestatus: Add missing quotes
If this was called without an argument you'd not have a valid `test`
invocation.

Gosh I hate test.
2021-01-22 21:55:35 +01:00
Fabian Homborg
a407af2944 completions/git: Silence git's errors
This can spew about not finding the ignore file in some circumstances.
2021-01-22 21:54:36 +01:00
Fabian Homborg
20741007c8 tests: Increase one more timeout
Alright, maybe it's the mode switch in this case.
2021-01-22 21:49:40 +01:00
Fabian Homborg
2109817861 MOAR CHANGELOG 2021-01-22 16:51:46 +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
435021e8c2 CHANGELOG 4: Possibly too much changelog edition
Some reformatting and showing an example for the prompt truncation, mainly
2021-01-21 19:07:38 +01:00
Alexander Sieg
ddab61616f
Include completion for all pkg alias subcommands (#7642)
* Include completion for all pkg alias subcommands

* Formatting and dynamic evaluation of alias subcommands

* only set package_name completion once

* fixed syntax error
2021-01-21 18:43:26 +01:00
Fabian Homborg
392fb490b0 CHANGELOG 3: Return Of The Changelog 2021-01-20 21:30:50 +01:00
Fabian Homborg
7265d3763f CHANGELOG: Even moar 2021-01-20 19:53:53 +01:00
Fabian Homborg
5d8761dc31 CHANGELOG: Work on 3.2.0 2021-01-20 17:57:09 +01:00
Fabian Homborg
e0455d13e7 tests/git: Start an interactive fish
This makes the fish_git_prompt variable handlers kick in, meaning we
see the informative chars.

The big question here is what happens if there's a non-UTF-8 locale in
the test.

Theoretically we set LC_CTYPE, but.....
2021-01-19 19:16:17 +01:00
Fabian Homborg
c5379aaf2d CHANGELOG Add 7638 2021-01-19 19:02:58 +01:00
Akatsuki Rui
1a9835f55e
completions/mtr: init (#7638)
* completions/mtr: init

Add mtr completion.

[ci skip]

* completions/mtr: edit descriptions
2021-01-19 18:09:09 +01:00
Fabian Homborg
89962da059 CHANGELOG: More 3.2.0 2021-01-19 13:45:00 +01:00