When given no path, the logic was happy to try to use
an unitialized output_location.
$ fish_indent -w < test.fish
Opening "(null)" failed: Bad address
Initialize the string, and repair the logic to catch this case
and report the problem correctly.
I mixed things up with `netctl` somehow. Since the two are quite
different they do not have the same function, they should not have
the same completions.
I also find that I would be smarter to only display the relevent
profiles given what we want to do. If we want to disable a profile
we should only complete with enabled profile for completion for
instance. I don't know if the implemention is nice enough however.
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.