While pid values may be reused, it is logical to assume that fish event
handlers coded against a particular job or process id mean just the job
that is currently referred to be any given pid/pgrp rather than in
perpetuity.
This trims the list of registered event handlers nice and early, and as
a bonus avoids the issue described in #7721.
The cleanup song-and-dance is extremely ugly due to the repeated locking
and unlocking of the event handler list.
Closes#7221.
This was a handler for various prompt variables that called a repaint.
Unfortunately, if you set one of those *inside* the prompt (a logical
place for it), this would lead to something like #7775.
So, because this isn't actually *useful* as far as I can see (how do
you set these variables in a way that you're not already inside a
prompt or about to draw a prompt? in a key binding?), we remove it,
like we removed the repaint from git's variable handlers.
Apparently the grep on FreeBSD doesn't do \s or \t. Since we're
looking for an actual tab, just give it an actual tab.
See https://builds.sr.ht/~faho/job/448496.
This `set -e` had a cartesian product that caused it to remove the
indexes separately, so the later indexes were off - removing the first
and then the second ends up removing the first and then the
old-*third* which is now the second.
Just quote the expansion so it runs in one go.
Fixes#7776
Because we removed repaint coalescing, currently setting any of the
git prompt variables in fish_prompt leads to a repaint loop (that
presumably aborts once it reaches the recursion limit).
Since repainting on these variables isn't really useful (when you
`set` them interactively you already get a new prompt), just remove
it.
There's two cases this "breaks":
- When you set a variable *after* the call to fish_git_prompt
- When you set a variable via a binding
In both of these it's not too much to expect an explicit "commandline
-f repaint", especially since for bindings that's already needed in
most cases, and setting a variable after using it isn't normal.
Fixes#7775.
It doesn't work on WSL, Solaris and Archlinux (and presumably that
means future versions of other linux distros).
In its current state I don't trust it enough to enable it anywhere by
default, especially since I'm not aware of an actual issue with the
named pipe (other than that the code is ugly).
Fixes#7774
Called as
__fish_print_pipestatus "[foo" "oof]" "|" (set_color green) (set_color --bold blue) 0 1 2
it would make the closing `oof]` bold green.
Fixes#7771.
The "classic" theme is a mostly useless wrapper around the basic theme
that just adds a collapsible sidebar (that we no longer have).
Moving to basic directly drops a layer of indirection and a file that
needs to be transferred over the net.
Same thing goes for "default.css" which literally just includes
classic.css (WHYYYY???)
(also this removes some useless javascript)
Unfortunately this has both stopwords and a length limit, and things
like "and" just are tough to search.
So what we do is leave everything as it is, but when a search fails,
we show a list of things that are hard to search for, currently that's
"and", "for", "if" and such.
Fixes#7757.
dynamic_cast requires rtti to be enabled. Now, this isn't a big
problem, but since this is our only dynamic_cast in the entire
codebase, and it's not serving an important function, we can just
replace it.
See #7764
This half-reverts commit a3cb1e2dcd,
avoiding the bit that passed arguments differently.
Note that this means the initial bug is kept in the hardcoded fallback title.
Fixes#7749.
* Ensure web_config works on WSL
web_config could sometimes fail on WSL if the user chose not to append
windows directories to their linux $PATH. This change ensures that the
cmd.exe executable is found in most cases even if windows directories
are not appended to $PATH on linux.
An error message letting the user know that cmd.exe was not found, and
that they should add the cmd.exe dir to their $PATH before running
fish_config is displayed if cmd.exe is still not found.
* Exit with a non 0 status code if cmd.exe is not found
My bet is that the Illumos, Cygwin, and WSL are not the only Unix-like
systems where the SIGIO notifier won't work, and since we have a good
enough and portable alternative that we can use be default on other
platforms where we don't specifically know it'll work, it doesn't make
sense not to go with that one instead.
Even if this patch is reverted at some point and we go back to
blacklisting platforms that *don't* support the SIGIO strategy, this is
almost certainly the right choice for inclusion in a minor release like
3.2.0.
See discussion in #6585.
In this context, as it stands, $last_pid will give fish's pid (because
of pgroup shenanigans).
Since that doesn't really work, just `disown` without and let fish
figure out what the last process was.
Theoretically this has an issue if someone started a background
process *before* the python script *and* that exits before we run
disown.
That's a vanishingly small window and this is only run on first start,
so it seems acceptable.
Fixes#7739.
NetBSD's sleep quits when foregrounded sometimes. I'm not entirely
sure *why*, but this is reproducible with the default /bin/sh, so it's
not our fault.
Because this fails our tests, go back to using cat *there*, because we
can't use it on macOS - 4c9d01cab0.
Apparently the fix for #6269 doesn't work until we set job-control to
full, which we won't do for this release.
So just drop it from the CHANGELOG.
See #7739.
* memset/memzero needs cstring/string.h (again)
* winsize_t requires an impl from <sys/termios.h>
With this patch, I was able to get fish master to build on Solaris 11.4
without any additional dependencies (after installing gcc 7, git, and
cmake). I think the ncurses dependency can be dropped from the
OpenIndiana package?
The GitHub documentation states that python3 w/ pip3 is already
installed, and homebrew is slow as molasses (and when it finally runs it
gives a warning about python already being installed and up to date).