Commit Graph

11628 Commits

Author SHA1 Message Date
Shun Sakai
2035b90bfe CHANGELOG: Add keepassxc-cli completions 2020-01-20 20:13:54 +08:00
Jason Nader
f63ae0fb4d Add missing comment to bower.fish
Same comment found in yarn.fish
2020-01-20 19:45:21 +08:00
Fabian Homborg
65397d4f5e Fix tests
By changing to flog I inadvertently changed the warning text from "<W>
fish:" to "warning:".

Since that's also okay, let's leave it.
2020-01-19 15:07:06 +01:00
Fabian Homborg
26fa774f44 Add path flog category 2020-01-19 14:55:39 +01:00
Fabian Homborg
f632a9e998 Add env-dispatch flog category 2020-01-19 14:55:39 +01:00
Fabian Homborg
4cb3ce0314 Add a 5 debug to the iothread flog 2020-01-19 14:55:39 +01:00
Fabian Homborg
483018222d Add complete flog category 2020-01-19 14:55:39 +01:00
Fabian Homborg
246882b52d Add proc-pgroup flog category
I'm not *super*-happy with this, because pgroups and terminal
ownership and such are quite entertwined.

But hey, if all fails just use `proc'*'`
2020-01-19 14:55:24 +01:00
Fabian Homborg
0c49f45028 fish_key_reader: Remove debug messages
These are related to *signal handlers* in fish_key_reader, and I don't
think this code needed to be touched since it was added.
2020-01-19 14:55:24 +01:00
Fabian Homborg
fe931aeea7 Add more messages to termowner flog category 2020-01-19 14:55:24 +01:00
Fabian Homborg
8b1ac0912b Add reader flog category
For both input and reader, because the "reader" term is more general
and we don't have enough messages to justify multiple categories
2020-01-19 14:55:08 +01:00
Fabian Homborg
a48926dee5 Add and use "should_flog" macro
Useful to figure out if a flog category is enabled.

We only use it in one place, but it seems like the sort of thing that
should exist.
2020-01-19 14:55:08 +01:00
Fabian Homborg
349b9e9dee Remove commented out debugs 2020-01-19 14:54:53 +01:00
Fabian Homborg
b09ae82ecf Remove a few less useful debug messages
These were level 5, so I'd bet nobody ever saw them
2020-01-19 14:22:50 +01:00
Fabian Homborg
5da4f7e7c5 Add flog category for config reading 2020-01-19 14:22:50 +01:00
Fabian Homborg
123676075f Add flog category for history *file* 2020-01-19 14:22:50 +01:00
Fabian Homborg
6793d35340 Add flog categories for parse-productions
One for usable messages, another for the chatty ones.

Use like `--debug=parse-productions'*'`.
2020-01-19 14:22:50 +01:00
Fabian Homborg
14c2c623b4 Add flog category for uvar file
This used debug level 5, which means it was basically unusable.
2020-01-19 14:22:50 +01:00
Fabian Homborg
4e0ec080e3 Add flog category for terminal support
This is meant to show messages related to what a terminal supports.

In particular which color or emoji it can handle.
2020-01-19 14:22:50 +01:00
Fabian Homborg
024e03ab1e Replace debug(1) with FLOGF(warning) 2020-01-19 14:22:39 +01:00
Fabian Homborg
384f18a51c Remove last remaining debug(0)
Replace with FLOGF.
2020-01-19 13:31:25 +01:00
Fabian Homborg
0e5846ee38 completions/fish: Rename debug-level
This was renamed to just "--debug", but missed in the completions.

See #5910

[ci skip]
2020-01-19 13:28:21 +01:00
Fabian Homborg
d972623191 Fix vendor paths without $XDG_DATA_DIRS
We'd use $__fish_data_dir, but that already had the "/fish" component,
and then we'd add it again later, so we would try to find vendor
functions in places like

/usr/share/fish/fish/vendor_functions.d

which obviously don't exist.

Instead let's add the "/fish" component to the xdg dirs early, which
also saves us from having to repeat it later.

Fixes #6428
See #6508

[ci skip]
2020-01-19 09:28:56 +01:00
Shun Sakai
f04536637d Add keepassxc-cli completions 2020-01-18 12:27:04 -08:00
ridiculousfish
e34e5d88db Remove Base16 mention from CHANGELOG
It's not in 3.1.0.
2020-01-18 12:26:25 -08:00
Greg Anders
e143618aef Set base16 colors for operator, escape, and match 2020-01-18 12:16:19 -08:00
Greg Anders
1331b32cce Add Base16 color options to fish_config 2020-01-18 12:16:19 -08:00
ridiculousfish
c14d54032f Add a cant_wait parameter to iothread_perform
Sometimes we must spawn a new thread, to avoid the risk of deadlock.
Ensure we always spawn a thread in those cases. In particular this
includes the fillthread.
2020-01-18 11:51:13 -08:00
ridiculousfish
d38db1bc61 Add a test for deep command substitutions 2020-01-18 11:50:50 -08:00
Johannes Altmanninger
b18f605e4f Fix completions if previous arg is a variable
complete -C'echo $HOM ' would complete $HOM instead of a new token.
Fixes another regression introduced in
6fb7f9b6b - Fix completion for builtins with subcommands
2020-01-18 20:21:10 +01:00
Fabian Homborg
1643df0d23 Docs: Clean up set_color
The wording should now be a bit nicer.

[ci skip]
2020-01-18 18:45:53 +01:00
Fabian Homborg
14fd4570d5 Test using more than 64 threads
See #6503
2020-01-18 10:43:59 +01:00
Fabian Homborg
018e51c935 Just hardcode a thread limit of 1024
64 is too low (it's actually reachable), and every sensible system should have a limit above
this.

On OpenBSD and FreeBSD it's ULONG_MAX, on my linux system it's 61990.

Plus we currently fail by hanging if our limit is reached, so this
should improve things regardless.

On my linux system _POSIX_THREAD_THREADS_MAX works out to 64 here,
which is just too low, even tho the system can handle more.

Fixes #6503 harder.
2020-01-18 10:30:32 +01:00
Fabian Homborg
ca08cc331b Use PTHREAD_THREADS_MAX if available
Stops us deadlocking on OpenBSD if we need more than 4 threads.

Fixes #6503
2020-01-18 09:07:31 +01:00
Johannes Altmanninger
b62fa53807 set error code on failed command substitution to 255 instead of -1
the exit status ought to be in 0-255, e.g. exit -1
2020-01-17 17:36:18 +01:00
Johannes Altmanninger
4170e8cff2 typo 2020-01-17 17:27:23 +01:00
Johannes Altmanninger
05ddda9155 use variable assignments on commandline in completions
Fixes #6507

To do: If a variable assignment uses a command substitution that errors,
the error is printed, but without a proper location.
2020-01-17 14:53:35 +01:00
Johannes Altmanninger
c513724d7b Do not store reference to a temporary
Seems to have worked by accident. I could swear that I had fixed this..
2020-01-17 14:49:52 +01:00
ridiculousfish
1da09f2c52 Ensure new job IDs are never smaller than existing running jobs
This makes job IDs "monotone" in the sense that newly spawned jobs
always have larger IDs than existing jobs, as requested in #6053
2020-01-16 16:01:29 -08:00
ridiculousfish
1978ac87a1 Remove reader_test_should_cancel
Use cancel_checker more pervasively.
2020-01-16 15:21:45 -08:00
ridiculousfish
0f7bba5f0e Introduce operation_context_t
This commit recognizes an existing pattern: many operations need some
combination of a set of variables, a way to detect cancellation, and
sometimes a parser. For example, tab completion needs a parser to execute
custom completions, the variable set, should cancel on SIGINT. Background
autosuggestions don't need a parser, but they do need the variables and
should cancel if the user types something new. Etc.

This introduces a new triple operation_context_t that wraps these concepts
up. This simplifies many method signatures and argument passing.
2020-01-16 15:21:28 -08:00
ridiculousfish
db98ee13a9 Make complete() return the completion list directly
Returning it through a pointer was a remnant of pre C++-11 days.
2020-01-16 15:18:50 -08:00
ridiculousfish
4bb18eaf42 Use completion_list_t naming everywhere
std::vector<completion_t> -> completion_list_t
2020-01-16 15:18:49 -08:00
ridiculousfish
98e714f98f clang-format .cpp and .h files 2020-01-16 15:18:28 -08:00
ridiculousfish
6705a2efc6 Migrate a bunch of code out of common.h
Put it into wcstringutil, path, or a new file null_terminated_array.
2020-01-15 13:16:43 -08:00
ridiculousfish
273afca3da Remove some dead code 2020-01-15 11:59:40 -08:00
ridiculousfish
4f01eef88d Default some ivars in wildcard_expander_t 2020-01-15 11:43:10 -08:00
ridiculousfish
5f130c2d6d Give wildcard_expand_result_t a real return value
Use an enum instead of an int.
2020-01-15 11:11:43 -08:00
David Adam
607b40f4c6 CHANGELOG: further work on 3.1.0
[ci skip]
2020-01-16 00:32:59 +08:00
ridiculousfish
7e1270ae70 Be more disciplined about cancellation signals
Rather than storing a "should cancel" flag in the parser, store the
actual signal which triggered cancellation.
2020-01-14 15:20:04 -08:00