This tested #1728, where redirecting a directory (`begin; something;
end < .`) would cause `status` to misbehave.
Unfortunately, on Illumos/OpenIndiana/SunOS, this returns a different
error (EINVAL instead of EISDIR), so we can't check that with our test harness, because
we can't redirect it.
Since it's not important that this gives the same error across
systems (and indeed we provide no way of intercepting the error!),
use an invocation test instead, because that allows different output per-uname.
See #5472.
Matches upstream path_helper which is invoked in /etc/profile and only
applies to login shells. Enables running interactive, non-login shells
with altered PATH values.
Reverts change in c0f832a7, which reverts change in adbaddf.
`fish_title` as invoked by fish itself is not running in an interactive
context, and attempts to read from the input fd (e.g. via `read`) cause
fish to segfault, go into an infinite loop, or hang at the read prompt
depending on the exact command line and fish version.
This patch addresses that by explicitly closing the input fd when
invoking `fish_title`.
Reported by @floam in #5629. May close that issue, but situation is
unclear.
These are files with staged modifications, and additional unstaged
ones.
In practice what happened was that you ran
git add somefile
then editted it some more and tried to
git add <TAB>
which didn't offer it anymore.
Now, we offer it if either modified or modified-staged is set.
Currently modified-staged isn't ever set alone, but through
all-staged, so we still need to keep offering the file then.
(This shows that the current switch/case might have some holes)
Fixes#5648.
[ci skip]
Taking advantage of the maybe_t's, the logic and nesting here
can be a bit less intense.
Small adjustments to debug output, and found a more accurate
version number for Lion Terminal.app.
Longer term we should have a terminal_t class or something
encapsulating all the kinds of terminal detection we have
with methods that return the color support, and also stuff
like whether the terminal has the newline glitch, the
ambiguous width character behavior, etc.
fish forks child processes when (for example) writing out builtin output.
After fork it resets signal handlers, but if a signal is delivered before
the signal handlers are reset, it will inherit fish's default handlers,
which do things like swallow SIGINT. Teach fish's default signal handlers
to detect this case and re-raise signals with default handlers.
This improves the reliability of control-C in the face of builtins.
This exposes it more, since it's quite an important function.
We should do the same with the other vcs functions.
We leave a compatibility shim in place for now.