Whenever completing any git commandline, we invoke __fish_git_using_command
173 times*. Every invocation calls "commandline" and "argparse"
to the same effect. Let's parse the command line once, and reuse the results
later.
I'm observing a speed-up from 200ms to 120ms with
perf stat -r 10 buildrel/fish -c 'complete -C "git checkout ">/dev/null'
Alternative solutions:
1. teach fish to cache such things automatically.
2. rewrite git completions to compute most completions in a single function,
which will naturally avoid redundant work. This sounds viable but it's
a lot of work.
* we have a thousand uses of __fish_git_using_command, so I'm not sure why
it's only 173.
See the discussion in #8266
As we've noticed a few times now, mingw/msys/cygwin has a fairly
horrible kill implementation that annoys us here.
However our workaround wasn't enough - "mingw" is also a name that is
used here and "msys" can also be a substring.
Also we need to silence the `kill` because it's better to not list the
signals than it is to spew errors.
Fixes#8915.
We don't need to make the feature flag descriptions as terse as
possible, I believe some people were confused by what this all means,
so we can dedicate a few lines to explaining it again.
This reverts commit ccb6cb1abe.
CI fails with
/home/runner/work/fish-shell/fish-shell/src/autoload.cpp:148:1: error: function ‘autoload_t::autoload_t(autoload_t&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
148 | autoload_t::autoload_t(autoload_t &&) noexcept = default;
| ^~~~~~~~~~
make[2]: *** [CMakeFiles/fishlib.dir/build.make:96: CMakeFiles/fishlib.dir/src/autoload.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:369: CMakeFiles/fishlib.dir/all] Error 2
make: *** [Makefile:139: all] Error 2
Not sure what's wrong - it compiles fine on my machine. Will check later.
Some terminals can be configured to send variuos escape sequences for keys
that could historically not be detected. Turns out some usage pattern rely
on those quirks.
Shift+Space is easy to mistype when wanting to insert a space (especially
when typing ALL CAPS). Map it to Space, to match user expectations.
Similarly for Control+Return, for which xterm can be configured to send
something other than \cr:
echo 'XTerm.vt100.modifyOtherKeys: 1' | xrdb && xterm
I'm working on a change to builtin bind that allows to bind CSI sequences via
human-readable key names (#3018) but for now let's just map the raw sequences.
Closes#8874
Even though we disable exceptions, we use noexcept in some
places to enable certain optimizations in std::vector, see
https://en.cppreference.com/w/cpp/utility/move_if_noexcept.
Some methods have noexcept only at their declaration (or only at the
definition). This will be an error when compiling with "g++ -std=c++17". Make
both signatures match.
micro only parses the [FILE]:LINE:COL syntax
if the parsecursor option is enabed
in the meanwhile, the +LINE:COL syntax is unambiguous and always valid
You can use an index with vared, like `vared PATH[4]`. However this was
inadverently broken in fa2450db30, because you cannot use `read` to
modify an element of a variable, only the whole variable. Fix this.
Unfortunately this means using another local variable, so we name it
__fish_vared_temp_value instead of just temp so that collisions are
unlikely.
This cleans up the path_get_path function which is used to resolve a
command name against $PATH, by removing the dependence on errno and
being explicit about which error is returned.
Should be no user-visible change here.
[100%] Building HTML documentation with Sphinx
[100%] Building man pages with Sphinx
../CHANGELOG.rst:13: ERROR: Unexpected indentation.
../CHANGELOG.rst:15: WARNING: Block quote ends without a blank line; unexpected unindent.
../CHANGELOG.rst:13: ERROR: Unexpected indentation.
../CHANGELOG.rst:15: WARNING: Block quote ends without a blank line; unexpected unindent.
localectl may emit an error for whatever reason. The localectl
completion runs localectl in a command substitution so our stderr
redirect doesn't apply. Just redirect to null. Hopefully this fixes the
tests.
This *might* be a bit faster running under TSAN, otherwise it takes >
400 seconds on Github Actions.
If this doesn't work we need to disable it for TSAN.
I *think* this is printing
> debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission denied
On Github Actions?
Might need to adjust the test to store the output.
The current Github Actions ubuntu-latest image crashes in the
autosuggest_suggest_special test with ASAN.
We have not been able to reproduce this locally, and this is getting
in the way.
I have no idea how to disable this test on ASAN specifically, all my
attempts have failed. So the only recourse I know is to disable the
ASAN tests on GA entirely.
* Print message in set_fish_path -v when a path doesnt exist
* Update changelog
* Remove "; or continue"
* use printf instead of echo, avoid localizing the path
Curses variables like `enter_italics_mode` are secretly defined to
dereference through the `cur_term` variable. Be sure we do not read or
write these curses variables if cur_term is NULL. See #8873, #8875.
Add a regression test.
Apple's terminfo has missing support for enter_italics_mode,
exit_italics_mode, and enter_dim_mode. Previously we would hack in such
support in set_color; migrate that to init_curses so we do it up-front
instead of opportunistically.