Return STATUS_INVALID_ARGS when failing due to evaluation errors,
so we can tell the difference between an error and falseness.
Add a test for the ERANGE error
The rest of the high-numbered exit codes are not values used by scripts
or builtins, they are internal to fish and come out of
the parser for example.
Prior to adding STATUS_INVALID_ARGS, builtins were usually exiting 2
if they had a special exit status for the situation of bad arguments.
Set it to 2.
We were not parsing an in-range number when we claimed we were,
and were thus failing to error with invalid numbers and returned
a wrong test result. Fixed#5414
Also, provide the detail we can for the other error cases.
Instead of maybe adding "-s" and "-M" if "-s" hasn't already been
given, just add "-s" to _every_ bind invocation, and "-M" to those who
need it.
Fixes#5028.
Largely reverts 007d794b6e.
fish_indent is extremely resource-intensive on large inputs and can crash; it also does not handle
invalid characters gracefully.
Work on #5402.
Just sets locale to "C" (because that's the only one we need), does
wcstod and resets the locale.
No idea why uselocale(loc) failed for me, but it did.
Fixes#5407.
This happens in firejail, and it means that we can't use it as an
argument to most pgid-taking functions.
E.g. `wait(0)` means to wait for the _current_ process group,
`tcsetpgrp(0)` doesn't work etc.
So we just stop doing this stuff and hope it works.
Fixes#5295.
The solarized themes now define pager colors, while other schemes
don't.
So if a user picks one of them, and then another, they'd keep the
pager colors.
Instead, since the default theme is now complete, any theme that does
not define its own pager colors will always get the default ones.
[ci skip]
This was missing a bunch of variables from __fish_config_interactive.
Ideally we wouldn't have to duplicate this info, but I don't have a
great solution either.
This removes ~140ms from every single prompt.
When not in a git repo, this prompt now takes ~9ms, as opposed to
~150ms before.
Fixes#5266 harder.
[ci skip]
This is quite ugly, but in lieu of putting in a proper ansi
parser (i.e. the output part of a terminal), since this is the only
such sequence we have seen until now, let's just match it.
Fixes#5312.
[ci skip]
- Remove use of `eval`
- Use `git rev-parse` instead of `git status` as its faster,
- especially in large repos. (in qt5: 600ms vs 1ms)
- Use return status instead of test -n
This should change nothing about the output.