My previous change removed one place where is_wchar_ucs2() was used and
replaced it with compile time tests. This change does the same for the
other uses.
On Cygwin there are two narrowing conversions at line 931 in
src/fish_tests.cpp due to the code assuming a wchar_t is four bytes.
Obviously that's wrong but only became an issue with the pending change to
switch to C++11. The problematic values aren't actually used on Windows
because the tests that would use them are bypassed if is_wchar_ucs2()
returns true. This change predicates that code on a compile time rather
than a run time test.
The last commit to this auto completion changed it to use `string replace` instead of `tr`. Unfortunately they do not behave the same. `tr " = " "\t"` replaces " = " with a tabulator character, while `string replace -a " = " "\t"` replaces it with \t. Either `string` is misbehaving or this auto completion was broken.
We cannot just use TERM = xterm and defined Ss sequence, as some old
vte-based terminals are still in the wild that don't support the
sequence and don't have $VTE_VERSION set.
I have tested this on
- konsole - supported and works ($KONSOLE_PROFILE_NAME)
- new xterm - supported and works ($XTERM_VERSION)
- lxterminal-gtk3 - supported and works ($VTE_VERSION)
- new gnome-terminal - supported and works ($VTE_VERSION)
- lxterminal-gtk2 - not supported and deactivated (no $VTE_VERSION)
- tmux in konsole - works
- tmux in lxterminal-gtk2 - deactivated
and for all supported ones with the respective variable erased, to see
that it is deactivated.
Fixes#3499.
* add completions for mkvextract
* fix edge cases with option placement in mkvextract.fish
* improve resiliency to errors in mkvextract.fish
* minor fixes in mkvextract.fish
There isn't a good reason to disallow an explicitly empty completion
description. Since I'm touching the code also modify the argument
parsing the match the style of most of the builtins.
Fixes#3557.
The changes related to issue #3068 removed most of the emacs bindings
from vi mode. However, since fish 2.4.0 was released several people have
pointed out that the directions for reinstating the legacy hybrid key
bindings don't work. This change fixes that and makes it easier to use
the legacy hybrid bindings.
Fixes#3556
This fixes some of the IWYU and cppcheck lint warnings. And only on
macOS (formerly OS X). Fixing these types of warnings on a broader set
of platforms should be done but this is a baby step to making `make
lint-all` have few, if any, warnings. This reduces the number of lines
in the `make lint-all` output on macOS by over 500 lines.
I found that after fixing the args to `cppcheck` it started reporting
lots of varFuncNullUB warnings. Suppress them as they should be safe to
ignore. Also, improve the readability of the script.
There was a discussion recently on Gitter about `set_color reset`. The
result was @floam creating commit bd03c3fbc to change it to `set_color
normal` in share/functions/vared.fish. This does the same for
tests/test_util.fish.
Switch from a linear to a binary search when looking for a matching
string in an enum map. Testing shows this is a little more than twice as
fast when searching for keywords in the sixteen entry keyword_map array.
This speedup doesn't matter much when searching for subbcommands but any
slow down in the parser is unacceptable.
I'm going to use the same mechanism elsewhere such as token_type_map
in src/parse_tree.cpp. But this change only affects the recently
introduce subcommand handling for the history and status commands.
Verified on Cygwin on MS Windows 7 when invoked as
`env LANG=zh_CN.GBK@cjknarrow fish`. No regression seen
when run on other systems with UTF-8 locales.
Fixes#3503
The `status` command currently silently allows incompatible flags (i.e.,
subcommands). Too, using flags to specify subcommands misleads the user
into thinking they can specify multiple subcommands.
We recently modified the `history` command to deprecate using flags for
subcommands. This change does the same for the `status` command.
Fixes#3509