Update Xcode project, HeaderDoc comments.
Fix various invalid HeaderDoc comments. Normalize autoload.cpp/autoload.h as an example of something closer to "proper" HeaderDoc formatting.
Have clang/Xcode validate HeaderDoc comments. Remove key_reader.cpp from Xcode project.
Fix test setup bogosities. Specifically, they weren't hermetic with respect to
locale env vars.
Rewrite the handling of locale vars to simplify the code and make it more like
the pattern most programs employ.
Fixes#3110
We need to actually export the curses/terminfo env vars in order for
`setupterm()` to be able to use them. While fixing this I reworked the
fallback logic implemented by @zanchey in response to issue #1060 in
order to simplify the logic and clarify the error messages.
This does not allow someone to change the curses/terminfo env vars after
the first prompt is displayed (you can but it won't affect the current
fish process). It only makes it possible to set `TERM`, `TERMINFO`, and
`TERMINFO_DIRS` in *config.fish* or similar config file and have them be
honored by fish.
The issue here is that when inserting a common prefix for e.g. a
substring match, we increase the amount of available candidates again to
things the user didn't want.
An example is in share/functions - a completion for "inter" would
previously expand to "__fish_" because it matched:
- __fish_config_interactive.fish
- __fish_print_interfaces.fish
- __fish_print_lpr_printers.fish
The completion afterwards would then show 189 possible matches, only
three of which (the above) actually matched the original "inter".
Fixes#3089.
Cppcheck was complaining about the `return val.c_str()` at the end of the
`wgettext()` function. That would normally a bug since the lifetime of
`val` ends when the function returns. In this particular case that's not
true because the string is interned in a cache. Nonetheless, rather than
suppress the lint warning I decided to modify the API to be more idiomatic.
In the process of fixing the aforementioned lint warning I fixed several other
lint errors in that module.
This required making our copy of `wgetopt()` compatible with the rest of
the fish code. Specifically, by removing its local definitions of the
"_" macro so it uses the same macro used everywhere else in the fish
code. The sooner we kill the use of wide chars the better.
Completion throws and error about the command `__fish_contains_opts` beings unknown. It seems to be a simple typo, as all other completions use `__fish_contains_opt`
This only eliminates errors reported by `make lint`. It shouldn't cause any
functional changes.
This change does remove several functions that are unused. It also removes the
`desc_arr` variable which is both unused and out of date with reality.