Commit Graph

10272 Commits

Author SHA1 Message Date
ridiculousfish
bffacd2fbf Thread a parser into expansion
Expansion may perform command substitution, which needs to know the parser
to use.
2019-05-04 19:30:00 -07:00
ridiculousfish
4ce485525e Correct duplicate completion detection
Stop assuming that completions with the same hash are equal.
2019-05-04 18:35:22 -07:00
ridiculousfish
923a7ca0f0 Thread the parser into complete()
Eliminates uses of principal_parser
2019-05-04 18:17:18 -07:00
ridiculousfish
63bdc949ab Make completion request flags an enum_set 2019-05-04 17:55:57 -07:00
ridiculousfish
acd33cbabb Remove an unnecessary fetch of the principal parser 2019-05-04 16:56:38 -07:00
ridiculousfish
fbd4ff027a Initialize a field that was previously uninitialized
Caught by UBSan
2019-05-04 16:47:27 -07:00
ridiculousfish
c0c7b0f86f Make tsan detection gcc compatible 2019-05-04 16:13:55 -07:00
ridiculousfish
ec45f31ad1 Make debug_level an atomic
Fixes a tsan warning
2019-05-04 15:28:44 -07:00
ridiculousfish
0dd9f64bd9 Make topic monitor compatible with tsan
tsan does funny things to signals, preventing signals from being delivered
in a blocking read. Switch the topic monitor to non-blocking reads under
tsan.
2019-05-04 13:06:06 -07:00
Fabian Homborg
0784b76570 completions/env: Inhibit files
(Also remove annoying "commmand" description)

[ci skip]
2019-05-03 16:35:25 +02:00
Fabian Homborg
e91eb85949 argparse: Fix -- regression
I was a tad overzealous there with not appending the remaining
arguments.

Weird that we didn't test it, though.

Fixes #5857.
2019-05-03 16:20:40 +02:00
Fabian Homborg
411b4aea9d share/completions/env: Fix
This completed the commandline with options removed, which looked like

    env VAR=VAL command option

Which didn't really actually work.

Fixes #5856.

[ci skip]
2019-05-02 16:29:11 +02:00
ridiculousfish
649d3ac101 Simplify reporting of invalid config paths
Do this at a well defined point, instead of randomly the first time they're
queried.
2019-05-01 17:51:51 -07:00
ridiculousfish
72e43a514b Correct the warning for invalid directories
This was inadvertently broken.
2019-05-01 17:47:50 -07:00
ridiculousfish
55e3270ac4 Remove erase_list from process_clean_after_marking
We don't need to maintain an erase_list in this function any more.
Simply remove jobs that are completed.
2019-05-01 16:32:14 -07:00
ridiculousfish
3dfaa192da Put back process and job exit events
These were removed in f8b2e818ed under a
belief that they were unused. But they are documented and supported.
2019-05-01 16:32:14 -07:00
ridiculousfish
43d668bdc8 Continue to refactor internal loop of process_clean_after_marking
Factor our logic around when to print a message.
2019-05-01 16:32:14 -07:00
ridiculousfish
b5d3fadf44 Factor out the individual process handling in process_clean_after_marking
Helps break up this monolith.
2019-05-01 16:32:14 -07:00
ridiculousfish
b8170ec1ce Clarify return value of job_reap and process_clean_after_marking 2019-05-01 16:32:14 -07:00
ridiculousfish
9700800ecf Factor disowned job removal into its own function
This helps break up process_clean_after_marking.
2019-05-01 16:31:21 -07:00
ridiculousfish
c05e72749a Rename PENDING_REMOVAL to DISOWN_REQUESTED
A commend implied that PENDING_REMOVAL was broader than it was. In practice
only disown() sets this flag. Rename the flag for clarity.
2019-05-01 15:37:53 -07:00
Aaron Gyes
b5865d2cba Spruce up fish_config output, show transcript of commands run
run_fish_cmd() now prints every command we run in a subshell

Fixes #5584
2019-04-30 14:08:11 -07:00
Fabian Homborg
05b2d4ee54 Docs: Document path vars more
Fixes #5741.

[ci skip]
2019-04-30 13:18:56 +02:00
Fabian Homborg
17116366dc docs: Remove explicit .html links
Instead, we link to rst labels, which could also work in non-html
output, or if the section ever moves elsewhere.

See #5696.

[ci skip]
2019-04-30 13:11:33 +02:00
Fabian Homborg
1377f71331 docs: Remove some more html
See #5696.

[ci skip]
2019-04-30 12:56:30 +02:00
Fabian Homborg
03431ae9a2 docs: Default to fish highlighting
This fixes highlighting in cmds/.

See #5696.

[ci skip]
2019-04-30 12:49:04 +02:00
Fabian Homborg
d8f922fd70 docs: Remove <outp> tags
fish_indent_lexer formats lines not starting with a prompt indicator
as output, as long as there is a prompt indicator elsewhere.

So these tags are useless and wrong.

See #5696.

[ci skip]
2019-04-30 12:44:55 +02:00
Fabian Homborg
6f45b8d632 docs/fish_indent_lexer: Support >_ as prompt indicator
This was widely used in the old docs, and currently it just allowed `>`.

See #5696.

[ci skip]
2019-04-30 12:44:49 +02:00
Fabian Homborg
3b532fc793 functions/fish_vi_key_bindings: Pass "-s" to shared bindings
Fixes #5853.

[ci skip]
2019-04-30 11:41:26 +02:00
David Adam
665ae3787a Switch to runtime check for /proc/self/stat
Removes a compile-time check that may have affected cross-compilation.

Work on #1067.
2019-04-30 16:23:28 +08:00
Fabian Homborg
e8fd83ca25 docs/index: Remove wrong "configuration variables"
Hat-tip to @enzotib on gitter.

[ci skip]
2019-04-29 21:19:43 +02:00
Wilke Schwiedop
95346770d3 Update emaint.fish 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
78e6631e53 formatting 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
05f79335cc completions/emerge: add verbose-conflicts 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
1b3643270d completions/epkginfo: add completion 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
d0c3a4f33f completions/equery: shorten descriptions 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
34f50883a4 completions/ebuild: add pretend command 2019-04-29 18:33:37 +02:00
Wilke Schwiedop
52450dc864 completions/emaint: fix logs command 2019-04-29 18:33:37 +02:00
Fabian Homborg
389f5074ad Add test for argparse crash
43929ced9
2019-04-29 17:03:16 +02:00
Fabian Homborg
43929ced90 src/builtin_argparse: Work around wgetopt crash
If on the last argument, and it was an unrecognized option, we can't
call `wgetopt_long()` again, or it'll crash.
2019-04-29 16:55:55 +02:00
Fabian Homborg
8c9359fdd4 src/builtin_argparse: Add --ignore-unknown flag
This keeps all unknown options in $argv, so

```fish
argparse -i a/alpha -- -a banana -o val -w
```

results in $_flag_a set to banana, and $argv set to `-o val -w`.

This allows users to use multiple argparse passes, or to simply avoid
specifying all options e.g. in completions - `systemctl` has 46 of
them, most not having any effect on the completions.

Fixes #5367.
2019-04-29 15:57:56 +02:00
ridiculousfish
d8ac051f89 Move selection_direction_t to pager.h and make it a class enum 2019-04-28 14:06:03 -07:00
ridiculousfish
3c9f95594a Update Dockerfile for cmake3 2019-04-28 11:41:37 -07:00
ridiculousfish
2507162f80 Revert "Add a test for autoload_t"
This reverts commit 51c62d6cc6.

Back out the test while I attempt to fix it
2019-04-27 20:14:06 -07:00
ridiculousfish
51c62d6cc6 Add a test for autoload_t 2019-04-27 16:16:48 -07:00
ridiculousfish
4ff50eba41 Remove autoload_t, rename autoloader_t to autoload_t
Now that there are no more clients of autoload_t, delete it and
rename autoloader_t to autoload_t. Also clean up the headers.
2019-04-27 15:47:08 -07:00
ridiculousfish
68a28106b2 Reimplement completion autoloading via autoloader_t
This switches the completion autoloading machinery to autoloader_t.
2019-04-27 15:37:24 -07:00
ridiculousfish
960266fe24 Reimplement the function store and autoloading
This cleans up how functions are stored and autoloaded. It eliminates the
recursive lock. Instead there is a single normal owning_lock that protects
the entirety of the function data. Autoloading is re-implemented via the
new autoloader_t.
2019-04-27 15:30:11 -07:00
ridiculousfish
3950dab9ff Add autoloader_t
autoloader_t will be the reimplementation of autoloading. Crucically it no
longer manages any locking or loading itself; instead all locking and loading
is performed by clients. This makes it easier to test and helps limit its
responsibilities.
2019-04-27 15:26:18 -07:00
ridiculousfish
b7ad6b5bdc Add autoload_file_cache_t
This will provide the "backing store" for autoloading.
2019-04-27 15:09:24 -07:00