Unfortunately this doesn't quite fix the issue with Pantheon
Terminal (#7913), as that somehow manages to re-set $VTE_VERSION by
the time littlecheck runs.
This reverts commit 3a5585df95.
This reverts a change that removed a lock. It's indeed true that in master,
fish script is bound to the main thread. But I'm working to remove that
limitation and these locks are important in that future.
When switching to the new ast, commands that were not decorated
statements (like function declarations) would be rejected from
autosuggestion validation because we could not find a command. Stop
rejecting them.
The owning locks were added after the original code and decorated with
comments indicating they are thread-safe, even though they're only ever
used from the main thread. Presuming the intent was to make future
manipulation of the code safer rather than to actually make use of any
thread safety guarantees, these have been wrapped in a new
`thread_exclusive` type which always calls ASSERT_IS_MAIN_THREAD.
The benefit is that this does not perform a syscall to lock a mutex
each time the variables are accessed.
a) they can screw up our expected output/behavior
b) they can blow up your system
In my case, the unit tests were calling Pantheon's fish integration
script which would then proceed to blow up dbus with messages about each
individual test completing.
When executed interactively and not piped, `functions` adds a comma as a
separator between each result. This removes the separator after the last
item.
highlight.cpp was blindly calling path_get_path for each head command
typed at the prompt which triggers a lot of syscalls via waccess.
It's still going to do that while commands are being composed, but now
it won't if we can make a cheap lookup to the builtins/functions hash
table and can determine that it's a valid command before inspecting the
filesystem.
When fish receives a "cancellation inducing" signal (SIGINT in particular)
it has to unwind execution - for example while loops or whatever else that
is executing. There are two ways this may come about:
1. The fish process received the signal
2. A child process received the signal
An example of the second case is:
some_command | some_function
Here `some_command` is the tty owner and so will receive control-C, but
then fish has to cancel function execution.
Prior to this change, these were handled uniformly: both would just set a
cancellation signal inside the parser. However in the future we will have
multiple parsers and it may not be obvious which one to set the flag in.
So instead distinguish these cases: if a process receives SIGINT we mark
the signal in its job group, and if fish receives it we set a global
variable.
The colors defined in `colorutils.js` are specified in
fish format, and therefore RGB values lack the leading
`#` character and do not fully follow the html/css spec
(w3.org/TR/css-color-4/#typedef-hex-color).
Web config sends these values as-is to the browser,
without first converting to a browser-friendly format.
While this (somehow) works for the most part, a few
colors get lost along the way and do not display in
the customization selector nor in the preview when
selected. This behavior was seen in Firefox.
To fix this, let's prepend the missing '#' character
to all RGB colors defined in `colorutils.js`.
This improves some generated completions, for example:
diff -u completions.old/g3topbm.fish completions.new/g3topbm.fish
+complete -c g3topbm -o stop_error -d 'This option tells g3topbm to fail when it finds a problem in the input'
-complete -c g3topbm -o stop_error
When CMake's own curses logic fails to find curses/ncurses, we fall back to
pkg-config and manually link the required libraries. Some platforms (RHEL 6,
see #6587) require CURSES_EXTRA_LIBRARY=tinfo, so we link against libtinfo
if it's found but are happy to continue without it if it doesn't exist.
Closes#6587
This adopts the Contributor Covenant Code of Conduct 2.0
We don't currently have an email address for enforcement, once that's set up we can
add it in.
[ci skip]