getopt doesn't work very well in the BSDs, and getent has plenty of
fallbacks to replace it when it's not available.
<https://github.com/terrycloth/fish-shell/commit/
47a768ceeaef1d702624802d83338edbcc0f377c#commitcomment-23613921>
Newer versions of GCC and Clang are not satisfied by a cast to void,
this fix is adapted from glibc's solution.
New wrapper function ignore_result should be used when a function with
explicit _unused_attribute_ wrapper is called whose result will not be
handled.
This reverts commit ee15f1b987.
The test relies on undefined behaviour (checking for errno in the
absence of an error condition) and was broken on OpenBSD.
Closes#4184.
Make the `env_var_t::missing_var()` object a singleton rather than a
dynamically constructed object. This requires some discipline in its use
since C++ doesn't directly support immutable objects. But it is slightly
more efficient and helps identify code that incorrectly mutates `env_var_t`
objects that should not be modified.
It's bugged me forever that the scope is the second arg to `env_get()`
but not `env_set()`. And since I'll be introducing some helper functions
that wrap `env_set()` now is a good time to change the order of its
arguments.
Specifically closes#4313.
Not being as agressive in what we ignore/blacklist, but can be revisited
easily in the future to add more characters to the argument blacklist.
Specifically closes#4313.
Not being as agressive in what we ignore/blacklist, but can be revisited
easily in the future to add more characters to the argument blacklist.
* Clarify dependencies: required vs optional, and build vs runtime.
A first pass at updating the dependency documentation, based on the
discussion in this thread:
https://github.com/fish-shell/fish-shell/issues/2062
* Clarify notes on dependency errors, tests, and VCS integration.
An optional feature that suggests you install Python is okay;
core-dumping is not.
The note on tests was about fish development tests, not the `test`
builtin for conditional syntax.
Specifically mention git, hg, and svn in the VCS section.
An optional feature that suggests you install Python is okay;
core-dumping is not.
The note on tests was about fish development tests, not the `test`
builtin for conditional syntax.
Specifically mention git, hg, and svn in the VCS section.
My previous change to eliminate `class var_entry_t` caused me to notice
that `env_get()` turned a set but empty var into a missing var. Which
is wrong. Fixing that brought to light several other pieces of code that
were wrong as a consequence of the aforementioned bug.
Another step to fixing issue #4200.
By far the most common problem with universal variables being overridden
by global variables is other values being imported from the environment;
the `set -q; or set -gx` is much more of an edge case.