Fabian Homborg
7d2eb9649c
functions/fish_vi_cursor: Detect a few more terms
...
These have $TERM entries of their own, so detecting them is quite easy.
2019-05-05 12:57:14 +02:00
Fabian Homborg
c22af0d8c7
functions/fish_vi_cursor: Simplify detection
...
This was quite famously rather complicated.
We drop a bunch of cases - we can't handle tmux-starting-terminals
100% accurately, so we just don't try. It should be quite rare that
somebody starts a different terminal from tmux.
We drop the `tput` since it is useless (like terminfo in general for
feature-detection, because everyone claims to be xterm).
So we just check if we are in konsole, iTerm, vte or genuine-xterm.
Fixes #3696 .
See #3481 .
2019-05-05 12:57:14 +02:00
Fabian Homborg
787ef3e558
functions/fish_vi_cursor: Move $XTERM_VERSION check earlier
...
Saves us from having to do it again and again.
2019-05-05 12:56:31 +02:00
Fabian Homborg
4078a3df26
build_tools/style.fish: Stop excluding completions
...
[ci skip]
2019-05-05 12:54:02 +02:00
Fabian Homborg
ce245704d7
Reformat completion scripts
...
These were excluded from style.fish
2019-05-05 12:53:09 +02:00
Fabian Homborg
15c50703ce
fish_indent: Allow semicolons for and
and or
...
As mentioned in #2900 , something like
```fish
test -n "$var"; and set -l foo $var
```
is sufficiently idiomatic that it should be allowable.
Also fixes some additional weirdness with semicolons.
2019-05-05 12:51:49 +02:00
Fabian Homborg
c2970f9618
Reformat all files
...
This runs build_tools/style.fish, which runs clang-format on C++, fish_indent on fish and (new) black on python.
If anything is wrong with the formatting, we should fix the tools, but automated formatting is worth it.
2019-05-05 12:09:25 +02:00
Fabian Homborg
90d64194c5
functions: Replace crummy forced tab with spaces
...
Still forced indentation, but at least the kind we recommend via
fish_indent.
Fixes #1472 .
2019-05-05 12:07:38 +02:00
Fabian Homborg
df7cb66ff9
build_tools/style: Make output a bit spicier.
...
COLORS! ALL THE COLORS! Well, three! No, wait, FOUR! But only if you
count "normal" as a color!
[ci skip]
2019-05-05 12:07:38 +02:00
Fabian Homborg
2b3f48d9ee
build_tools/style.fish: Use black as python formatter
...
(Also renames the silly "$f_files" to "$fish_files")
2019-05-05 12:07:38 +02:00
Fabian Homborg
3bea947bb5
fish_indent: Ignore consecutive semicolons
...
This removes semicolons at the end of the line and collapses
consecutive ones, while replacing meaningful semicolons with newlines.
I.e.
```fish
echo;
```
becomes
```fish
echo
```
but
```fish
echo; echo
```
becomes
```fish
echo
echo
```
Fixes #5859 .
2019-05-05 12:07:38 +02:00
Deniz Kızılırmak
c7cbf6dad0
Make 'git checkout' complete recent commits
2019-05-05 11:52:18 +02:00
ridiculousfish
1e171140d5
Make the input_common lookahead main-thread only
2019-05-04 20:58:36 -07:00
ridiculousfish
9018a7d5ee
Rename input_initialized to s_input_initialized and make it relaxed atomic
2019-05-04 20:58:35 -07:00
ridiculousfish
e10838d5d6
Make job_control_mode a static variable with accessors
2019-05-04 20:58:35 -07:00
ridiculousfish
9fb98baba6
Thread the parser into process_clean_after_marking
2019-05-04 20:58:35 -07:00
ridiculousfish
32d1b3d7cb
Simplify looping in readb
2019-05-04 20:58:35 -07:00
ridiculousfish
edab366d3a
Eliminate the "input callback queue"
...
This was a sort of side channel that was only used to propagate redraws
after universal variable changes. We can eliminate it and handle these
more directly.
2019-05-04 20:58:35 -07:00
ridiculousfish
56fd6f696b
Improve thread safety in input.cpp
2019-05-04 20:58:35 -07:00
ridiculousfish
36998eee55
Make more miscellaneous globals thread safe
2019-05-04 20:58:35 -07:00
ridiculousfish
e2c66a8131
Make termsize thread safe
2019-05-04 20:58:35 -07:00
ridiculousfish
0de1611bf1
Migrate builtin_complete recursion_level into parser_t::libdata
2019-05-04 20:58:35 -07:00
ridiculousfish
2ce827343e
Universal variables to become a latch variable
2019-05-04 20:58:35 -07:00
ridiculousfish
b0a695e9fa
Migrate the global exec_count into the parser
2019-05-04 20:58:35 -07:00
ridiculousfish
fe68287cb0
Make miscellaneous variables thread-safe
2019-05-04 20:58:35 -07:00
ridiculousfish
6e143bf50f
Eliminate history_collection_t
...
This was a pretty useless type.
2019-05-04 20:58:35 -07:00
ridiculousfish
3d63a68dd0
Make builtin_random thread safe
2019-05-04 20:58:35 -07:00
ridiculousfish
f66e010949
Turn a lot of common.h variables into getter functions
...
Improves thread safety.
2019-05-04 20:58:35 -07:00
ridiculousfish
9dc1fd50c9
Introduce global_safety.h
...
This is a set of types that enable characterizing the proper way to access
global variables.
2019-05-04 20:53:32 -07:00
ridiculousfish
ec522e5978
Migrate s_main_thread_request_queue to owning_lock
2019-05-04 20:42:56 -07:00
ridiculousfish
18cecd3663
Beef up find_globals
...
Allow it to find the source declarations for globals, and ignore const ones.
2019-05-04 20:42:48 -07:00
ridiculousfish
1e57424011
Thread a parser into function_exists
...
Since this may autoload, it needs a parser with which to autoload.
2019-05-04 20:20:52 -07:00
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