Appending to an fd doesn't really make sense, but we allowed the
syntax previously and it was actually used.
It's not too harmful to allow it, so let's just do that again.
For the record: Zsh also allows it, bash doesn't.
Fixes#6614
(cherry picked from commit aba900a71f5313990f96ccf20e6751e4a70b8fde)
When building fish-shell with the macOS 10.12 SDK, <sys/proc.h> does not
include <sys/time.h> but references `struct itimerval`. This causes a
compilation failure if we don't import <sys/time.h> ourselves.
This was previously masked by an import of <sys/sysctl.h>, which was
removed in fc0c39b6fdb6.
(cherry picked from commit 47aeaa15350b49c4b86a84b3c49e8ba9064b788b)
Yeah, this was needed in the *header*.
God I hate headers.
Fixes#6604, for real this time
(cherry picked from commit f79ff7209627cc12e55cadf8b275a00ed4a378e7)
This was lost in 35671dd9f094cf8c643c9cf224c27a2b55578937.
Even tho we plan to drop caret redirection, while it's there it should
fully work.
Fixes#6591.
(cherry picked from commit 13b470af0756dcdacaeee8a69426e1ac8c26ebbb)
Glob ordering is used in a variety of places, including figuring out
conf.d and really needs to be stable.
Other ordering, like completions, is really just cosmetic and can
change if it makes for a nicer experience.
So we uncouple it by copying the wcsfilecmp from 3.0.2, which will
return the ordering to what it was in that release.
Fixes#6593
(cherry picked from commit f053cd27c61c687c19b80b18dd0ee9331effb890)
Everything seems to be working, so instead of crashing just print an
error and return.
Fixes#6597
(cherry picked from commit ceba851d44dea68b9e1b2b551e37fd6834767357)
Perform an ad-hoc code signing with the hardened runtime.
This ensures that these executables can pass notarization.
The code signing ID is controlled by the MAC_CODESIGN_ID CMake
cache variable.
The `function --on-job-exit caller` feature allows a command substitution
to observe when the parent job exits. This has never worked very well - in
particular it is based on job IDs, so a function that observes this will
run multiple times. Implement it properly.
Do this by having a not-recycled "internal job id".
This is only used by psub, but ensure it works properly none-the-less.
faho:
Backport of 6bf9ae9aeb654985384426872998707bb6851298
Fixes#6613
Same issue occurs here, as in #6270 (and fixed in 611a658 for `__fish_describe_command.fish`). Same reason. I've just copied the same workaround and changed the function name to match.
(cherry picked from commit f7edfba5d7c52bb9d2e1d11c9568fb2e0ca14982)
This makes two changes:
1. Remove the 'brace_text_start' idea. The idea of 'brace_text_start' was
to prevent emitting `BRACE_SPACE` at the beginning or end of an item. But
we later strip these off anyways, so there is no apparent benefit. If we
are not doing brace expansion, this prevented emitting whitespace at the
beginning or end of an item, leading to #6564.
2. When performing brace expansion, only stomp the space character with
`BRACE_SPACE`; do not stomp newlines and tabs. This is because the fix in
came from a newline or tab literal, then we would have effectively
replaced a newline or tab with a space, so this is important for #6564 as
well. Moreover, it is not easy to place a literal newline or tab inside a
brace expansion, and users who do probably do not mean for it to be
stripped, so I believe this is a good change in general.
Fixes#6564
Just another version of the error. We still want to get a bug if it
ever triggers a *wrong* error, so we still list all the options
instead of going for `.*option:.*Z.*`.
Fixes#6554
(cherry picked from commit e8000cfea9d2abde4acf07e759e18706a1f8010a)
Solaris/OpenIndiana/Illumos `rm` checks that and errors out.
In these cases we don't actually need it to be a part of $PWD as
it's just for cleanup, so we `cd` out before.
See #5472
See 1ee57e92447781b5ff79aaa7c55f6468fc84a37d
Fixes#6555Fixes#6558
(cherry picked from commit 9cbd3d57a01ba8f4813febff83210f595518cea1)