Commit Graph

13732 Commits

Author SHA1 Message Date
Fabian Homborg
c96a07dc96 Revert "Prevent redirecting internal processes to file descriptors above 2"
FDs are inherited, and redirecting those is harmless, and forbidding
that is worse than allowing all.

Fixes #7769.

This reverts commit 11a373f121.
2021-03-03 22:26:33 +01:00
Fabian Homborg
791b42f065 Disable SIGIO notifier
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
2021-03-03 22:26:28 +01:00
Fabian Homborg
0a3fec5e8b __fish_print_pipestatus: Reset modifiers again
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.
2021-03-03 19:20:28 +01:00
Fabian Homborg
a36dbad3b8 cmake: Stop copying css files
custom no longer exists and pygments is just with the theme
2021-03-02 17:04:47 +01:00
Fabian Homborg
54ff7b29a9 docs: Give logo a specific width 2021-03-02 17:03:32 +01:00
Fabian Homborg
5b4db4a6ea docs: Remove some useless wrappers
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)
2021-03-02 16:59:38 +01:00
Fabian Homborg
edfa6746c6 docs: Move pygments css 2021-03-02 16:52:28 +01:00
Fabian Homborg
bf801afef8 docs: Move custom.css into the main css
There's no real separation here so one file is preferable.

We'll leave the pygments.css intact because that handles a different thing
2021-03-02 16:49:23 +01:00
Fabian Homborg
955c0003ca fd_monitor: Explicity include <thread>
Might fix issues with gcc 11.0.1.

See #7764.
2021-03-02 15:27:13 +01:00
Fabian Homborg
119b978cbc type: Add --quiet back
It's supposed to be *deprecated*, not removed. The documentation even
specifically calls it out.

Fixes #7766
2021-03-02 14:53:02 +01:00
Fabian Homborg
12e059adf8 docs: Hardcode a list of short builtins for unmatched search
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.
2021-03-02 14:17:29 +01:00
Érico Rolim
d948b34420 Include <termios.h> instead of <sys/termios.h>.
Slipped by with ffa24eb361. Given
daf5ef1bbd, fish should be using
<termios.h> in all cases.
2021-03-02 12:05:07 +01:00
Fabian Homborg
abaa057e5c Replace our only dynamic_cast with old-school casting
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
2021-03-02 09:44:23 +01:00
David Adam
d655d24148 CHANGELOG: add headers for next release 2021-03-01 22:53:29 +08:00
David Adam
63fa8dfd26 fish.spec: drop RHEL 6 elements
RHEL/CentOS 6 are now out of support by upstream and fish.
2021-03-01 22:16:01 +08:00
David Adam
670868f853 Release 3.2.0
Closes #6585.
2021-03-01 20:47:02 +08:00
David Adam
bffb18043f CHANGELOG: work on 3.2.0 2021-03-01 20:29:45 +08:00
Ilya Grigoriev
a04ba04588 Fix git.fish test failing because of an alias
I have an alias `adda=add :/` in my globabl `.gitconfig`, which
made the test fail. This is the fix.
2021-03-01 10:02:03 +01:00
David Adam
c402ce0152 docs: note that function --on-variable is not fired for every change
As discussed in #7735.
2021-02-28 21:24:22 +08:00
David Adam
3e8e864c7c docs: note job expansion in bg/fg/jobs arguments
Discussed in #5019.
2021-02-28 20:56:23 +08:00
exploide
1f3fdf2de6 added hashcat completions 2021-02-28 12:13:58 +01:00
exploide
5ab61dde12 added completions for JohnTheRipper 2021-02-28 12:13:58 +01:00
Brett Jia
384975c892
git: Shorten various long descriptions (#7752)
* Shorten various long descriptions

* Address review comments
2021-02-28 12:12:57 +01:00
Afsar Pasha
9909623262 Fixed __fish_adb_get_devices 2021-02-28 12:12:01 +01:00
Fabian Homborg
6b6f8d2295 Avoid changing how custom fish_titles are called
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.
2021-02-28 08:40:39 +01:00
David Adam
3090f8b501 CHANGELOG: work on 3.2.0 2021-02-27 22:45:56 +08:00
Birk Tjelmeland
2719179bc1 Fix pandoc completion error
Pandoc completions would give an error if the folder `~/.pandoc`
does exist. This commit fixes that.
2021-02-27 22:31:42 +08:00
nosed1ve
aa608a42ff
Ensure web_config works on WSL (#7742)
* 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
2021-02-25 16:21:34 +01:00
Fabian Homborg
459ac2b566 Reset the readline loop state when setting the buffer
Fixes #7740.
2021-02-25 16:19:28 +01:00
David Adam
39230978b3 docs: call the CHANGELOG "release notes" 2021-02-25 22:46:24 +08:00
Mahmoud Al-Qudsi
42d9f33e16 Use a platform whitelist for opting into the SIGIO notifier
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.
2021-02-24 14:40:17 -06:00
Fabian Homborg
b8d28158a6 Do disown the completion updating without $last_pid
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.
2021-02-24 20:30:01 +01:00
Fabian Homborg
b154ad6a5c pexpects/fg: Don't use sleep on NetBSD
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.
2021-02-24 20:02:20 +01:00
Fabian Homborg
bb0d4ed878 CHANGELOG: Completion generation still warns
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.
2021-02-23 19:47:31 +01:00
Mahmoud Al-Qudsi
ffa24eb361 Fix build on Solaris (and hopefully OpenIndiana)
* 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?
2021-02-23 11:02:55 -06:00
Mahmoud Al-Qudsi
d95e99f2d4 Fix missing memset/memzero on Illumos
Tested w/ GCC 9 under OpenIndiana 2020.
2021-02-22 20:58:42 -06:00
Mahmoud Al-Qudsi
070e6e41ca Remove homebrew dependency in macOS CI workflow
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).
2021-02-22 20:35:56 -06:00
Mahmoud Al-Qudsi
17926a9197 Allow low-level tests to at least run to completion under Cygwin
They still don't pass due to path differences, but at least they run to
completion so we can tell just how broken everything is.
2021-02-22 16:27:45 -06:00
Mahmoud Al-Qudsi
d769582023 Ignore intentional redundant move under GCC
This bubbled up after Wredundant-move was added to the build script and
was observed under the CI environment running GCC 9.3.0.
2021-02-22 15:55:40 -06:00
Fabian Homborg
d0a8493844 Don't open pager with only one completion
Since smartcase, we could land in a situation where we offer one
option in the pager, which is awkward.

So detect this and just insert the option directly, we can add any
more smartness later.

Fixes #7738.
2021-02-22 22:51:52 +01:00
Mahmoud Al-Qudsi
050fd342da Support both GCC's Wno-redundant-move and LLVM's Wredundant-move 2021-02-22 15:44:17 -06:00
Mahmoud Al-Qudsi
1305a0899c Fix comparison warnings on UTF-16 platforms
Without true handling of UTF-16 surrogate pairs, all we can do is
properly detect the BMP range in UTF-16 environments and bail if the
input is in a non-BMP region.

There isn't much else we can do as it is incorrect to encode the
surrogate pairs themselves (fish doesn't know what to do with them and
they're illegal under either of UTF-8 or UTF-32).

(I'm not aware of fish being used in any UTF-16 platforms other than
Cygwin.)
2021-02-22 15:03:49 -06:00
Mahmoud Al-Qudsi
215df7eec6 Extend PCRE2 wchar_t interop support to 16-bit wchar_t impls
Previously, the interop glue for more friendly access to PCRE2's
fixed-size values was only used when char32_t/wchar_t were
interchangeable and PCRE2 was used with a global 32-bit unit width set;
this patch extends the same to char16_t when wchar_t is also 16-bits
(namely on Cygwin) to avoid compilation fpermissive warnings about casts
between types of potentially different sizes.

Reported in #6585.
2021-02-22 13:51:29 -06:00
Fabian Homborg
9b763581cf cmake: Only check mbrtowc on Apple
The only thing we know ever triggered this is old macOS versions,
there's no need to use it for everyone else.

Since this uses try_run it breaks when cross-compiling, which
shouldn't be a common thing on macOS.

Fixes #7737
2021-02-22 20:17:17 +01:00
Mahmoud Al-Qudsi
2cf5fd3d5d Avoid hard compilation errors on platforms w/out O_ASYNC
Those platforms should not be using the sigio notifier in the first
place, this just stops them from failing to be able to compile fish
altogether.

See #6585
2021-02-21 22:39:32 -06:00
David Adam
9e1cd95eb1 CHANGELOG: work on 3.2.0 2021-02-21 21:44:26 +08:00
David Adam
e9ec95f875 docs: minor updates to math documentation
Closes #7734.
2021-02-21 21:34:15 +08:00
David Adam
0808e5094b CHANGELOG: work on 3.2.0
Drops the headers for next-minor for now
2021-02-21 10:43:56 +08:00
ridiculousfish
11a373f121 Prevent redirecting internal processes to file descriptors above 2
The user may write for example:

    echo foo >&5

and fish would try to output to file descriptor 5, within the fish process
itself. This has unpredictable effects and isn't useful. Make this an
error.

Note that the reverse is "allowed" but ignored:

    echo foo 5>&1

this conceptually dup2s stdout to fd 5, but since no builtin writes to fd
5 we ignore it.
2021-02-20 16:16:45 -08:00
Ilya Grigoriev
622f2868e1 Fix set -U when fish_variables is a symlink
Previously, `set -U` would overwrite the symlink with a
regular file.

Fixes https://github.com/fish-shell/fish-shell/issues/7466
2021-02-20 14:24:11 -08:00