Commit Graph

14374 Commits

Author SHA1 Message Date
ridiculousfish
8bed818039 Remove some main thread assertions that are not helping
This is to make experimenting with concurrent execution easier.
No functional change in this commit.
2021-07-15 10:49:27 -07:00
ridiculousfish
6960a56f29 parse_util_locate_brackets_of_type to only find cmdsubs
Now that we have a separate function for parsing slices, we no longer
need to support parsing slices in the same function as cmdsubs.
2021-07-14 13:59:48 -07:00
ridiculousfish
52c354a60f Simplify slice parsing in highlighting
Factor out parsing of slices, which is only used for highlighting.
2021-07-14 13:59:48 -07:00
ridiculousfish
a2dfd87928 Simplify parse_util_get_parameter_info
We no longer use any part of the "parameter info" except its quote type.
Just return the quote type directly.
2021-07-14 13:59:48 -07:00
ridiculousfish
083d8c5d23 Minor cleanup of certain parsing and quote finding functions
This makes more variables const and removes some suspicious casts.
2021-07-14 13:59:46 -07:00
Fabian Homborg
900e4a232e fish_config: Error for choose/save with too many/few args 2021-07-14 19:48:33 +02:00
Fabian Homborg
6dd010a0e1 I'm going through changeeeeeeesss 2021-07-14 18:57:38 +02:00
Fabian Homborg
768afadcad Also read home theme directory in webconfig 2021-07-14 18:56:19 +02:00
Fabian Homborg
8223e6f23e fish_config: Add CLI-based theme selector
`fish_config theme`:

- `list` to list all available themes (files in the two theme
directories - either the web_config/themes one or
~/.config/fish/themes!)
- `show` to show select (or all) themes right in the terminal - this
starts another fish that reads the theme file and prints the sample
text, manually colored
- `choose` to load a theme *now*, setting the variables globally
- `save` to load a theme and save the variables universally
- `dump` to write the current theme in .theme format (to stdout)
- `demo` to display the current theme
2021-07-14 18:56:19 +02:00
Fabian Homborg
fd35dc2aa1 completions/git: Describe more "log" options
And do this by reusing other entries - mostly range-diff's.
2021-07-14 18:24:08 +02:00
Fabian Homborg
ee3a1f24c3 completions/gpg: Don't require an email address
Fixes #8079
2021-07-14 17:30:51 +02:00
Fabian Homborg
01b0b04cbf docs: Remove lAtEx thing again
Now it's screaming in the man builder.

Honestly, some parts of sphinx aren't very well thought out.
2021-07-14 17:03:41 +02:00
Fabian Homborg
2b7f6e4b0c docs: Put a note on which binding function to call in each section
Fixes #8084.
2021-07-14 16:49:22 +02:00
Fabian Homborg
df6109b953 docs: Reword bit about aliases and autoloading
This was kinda misleading. Point people to funcsave and `alias --save`
instead.

Fixes #8137.
2021-07-14 16:46:26 +02:00
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
13c5381c07 CHANGELOGGE 2021-07-14 16:39:07 +02:00
Fabian Homborg
e013422143 Deduplicate $fish_user_paths automatically
In the variable handler, we just go through the entire thing and keep
every element once.

If there's a duplicate, we set it again, which calls the handler
again.

This takes a bit of time, to be paid on each startup. On my system,
with 100 already deduplicated elements, that's about 4ms (compared to
~17ms for adding them to $PATH).

It's also semantically more complicated - now this variable
specifically is deduplicated? Do we just want "unique" variables that
can't have duplicates?

However: This entirely removes the pathological case of appending to
$fish_user_paths in config.fish (which should be an FAQ entry!), and the implementation is quite simple.
2021-07-14 16:37:30 +02:00
Johannes Altmanninger
405ef31f72 Increase tmux-prompt test timeout in CI
This failed on Ubuntu and Mac.
2021-07-14 08:46:03 +02:00
Johannes Altmanninger
6c22c0e30d completions/git: do not attempt to complete rev:file in option words
Fixes #8139
2021-07-14 00:01:20 +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
feb3a15739 docs: Make title level consistent
This allows us to ..include these without getting confused.
2021-07-13 23:05:23 +02:00
Johannes Altmanninger
5999d660c0 Docs for "$(cmd)" and $(cmd) 2021-07-13 21:33:42 +02:00
Johannes Altmanninger
0ab6735450 Support $(cmd) command substitution as alternative to (cmd)
For consistency with "$(cmd)" and with other shells.
2021-07-13 21:33:42 +02:00
Johannes Altmanninger
ec3d3a481b Support "$(cmd)" command substitution without line splitting
This adds a hack to the parser. Given a command

	echo "x$()y z"

we virtually insert double quotes before and after the command
substitution, so the command internally looks like

	echo "x"$()"y z"

This hack allows to reuse the existing logic for handling (recursive)
command substitutions.

This makes the quoting syntax more complex; external highlighters
should consider adding this if possible.

The upside (more Bash compatibility) seems worth it.

Closes #159
2021-07-13 21:33:42 +02:00
Johannes Altmanninger
4437a0d02a Minor doc rewording to use active voice 2021-07-13 21:33:42 +02:00
Fabian Homborg
ab2108cadc docs: Ignore github issues in linkcheck
This allows

    sphinx-build -blinkcheck . /dev/null

To be used without getting rate-limited to hell by github because the
release notes include hundreds of links to our own issues. Just assume
all issue numbers are valid.
2021-07-13 17:53:21 +02:00
Fabian Homborg
0ae6d34845 docs: Make lAtEX output *work*
pdflatex simply doesn't cut it.

This still results in an awkward pdf that starts with "Further
Reading" (the intro section is placed before it, but doesn't have a
chapter marker!) and ends with a massive "Other help pages" chapter
that includes *the entire rest of the docs*.

But it's generally readable and acceptably formatted (with a lot of
empty pages in between).
2021-07-13 17:53:21 +02:00
Fabian Homborg
bacb1efc72 docs/conf: Remove some unneeded guff 2021-07-13 17:53:21 +02:00
Johannes Altmanninger
e50805646e completions/git: define function before use 2021-07-12 23:42:01 +02:00
Johannes Altmanninger
e3d8b315ed Avoid global and user git config leaking into git tests 2021-07-12 23:42:01 +02:00
Johannes Altmanninger
fab06020af Changelog flossing 2021-07-12 23:42:01 +02:00
Siavash Askari Nasr
ab201f7590 Add completion for Rakudo
[Rakudo](https://rakudo.org/) is an implementation of the
[Raku](https://raku.org/) programming language.
2021-07-12 21:33:36 +02:00
Fabian Homborg
c8a2837647 Tests: Skip cancel tests on CI
This apparently doesn't work at all under Github Actions with tsan, so let's skip it.

If anyone feels the need to dig deeper into this, have at it. I find
this distracting.
2021-07-12 18:54:40 +02:00
Fabian Homborg
7789651b8a Tests: Increase timeouts even more in CI
Have I ever mentioned I hate this?
2021-07-12 18:45:46 +02:00
Fabian Homborg
e212064978 Tests: Increase timeouts
Yet again, fails on Github Actions with tsan.
2021-07-12 18:16:18 +02:00
Raman Gupta
ed7a64ea77 Replicate upstream git logic for alias commands 2021-07-12 16:39:44 +02:00
ridiculousfish
179073ce62 Clear the control-C cancel flag earlier, allowing event handlers to run
When the user presses control-C, fish marks a cancellation signal which
prevents fish script from running, allowing it to properly unwind.
Prior to this commit, the signal was cleared in the reader. However this
missed the case where a binding would set $fish_bind_mode which would
trigger event handlers: the event handlers would be skipped because of
the cancellation flag was still set. This is similar to #6937.

Let's clear the flag earlier, as soon as we it's set, in inputter_t.
Fixes #8125.
2021-07-11 18:04:44 -07:00
Fabian Homborg
c5d4f26b09
Merge PR #8127: fish_config: Read colorschemes from .theme files
fish_config: Read colorschemes from .theme files
2021-07-11 22:18:46 +02:00
David Adam
70eca5e204 function: note limits on signal triggers in documentation
See #5160.
2021-07-11 23:03:39 +08:00
David Adam
db25662541 CHANGELOG: work on 3.4.0 2021-07-11 21:02:45 +08:00
radiantly
55e60eeae2 Add completions for black (#8123) 2021-07-11 14:35:39 +02:00
Fabian Homborg
e021773288 Address review feedback 2021-07-11 11:23:16 +02:00
Fabian Homborg
4ec06f025c Fix fish_config prompt completions
Oops
2021-07-11 10:13:34 +02:00
Tair Sabyrgaliyev
8f7ea1f5b6 fix 'socket file name too long' error
In some setups (eg. macports) $tmpdir can expand to more than
100 symbols and tests fail with 'socket file name too long'
errors.

Using relative path to socket file fixes the issue.
2021-07-11 09:28:51 +02:00
Siavash Askari Nasr
8d17f81d66 Add zef completion
[zef](https://github.com/ugexe/zef) is a module manager for
[Raku](https://raku.org/) programming language.
2021-07-11 09:26:21 +02:00
YAKSH BARIYA
46ae46b54e
Add initial completion for Angular CLI (#8111)
* Add initial completion for Angular CLI

* Remove completion for `ng completion`

The `ng completion` doesn't exist. The completiond were autogenerated
using a script. See angular/angular-cli#21085

* Use shorter wording

* Fix typos
2021-07-11 09:25:04 +02:00
David Adam
44463f459f CHANGELOG: work on 3.4.0 2021-07-10 20:41:33 +08:00
Fabian Homborg
fa20dc8141 Do install the themes
This has cheesy pattern matching that I'm not entirely sure adds
anything?

Surely if we add something to share/web_config that should be
installed *by default*?

Anyway, let's just add .theme to it
2021-07-10 11:13:10 +02:00
Fabian Homborg
0e1f5108ae
string: Allow collect --allow-empty to avoid empty ellision (#8054)
* string: Allow `collect --no-empty` to avoid empty ellision

Currently we still have that issue where

    test -n (thing | string collect)

can return true if `thing` doesn't print anything, because the
collected argument will still be removed.

So, what we do is allow `--no-empty` to be used, in which case we
print one empty argument.

This means

    test -n (thing | string collect -n)

can now be safely used.

"no-empty" isn't the best name for this flag, but string's design
really incentivizes reusing names, and it's not *terrible*.

* Switch to `--allow-empty`

`--no-empty` does the exact opposite for `string split` and split0.

Since `-a`/`--allow-empty` already exists, use it.
2021-07-09 21:20:58 +02:00
Fabian Homborg
072d735853 Webconfig: Remove colorschemes from js
This still keeps the Nord and Solarized palettes because we use the
backgrounds in the sample background list.
2021-07-09 20:36:59 +02:00