This changes the default escape timeout for the default keybindings (emacs
mode) to 300ms and the default for vi keybindings to 10ms.
I couldn't resist fixing a few nits in the fish_vi_key_bindings.fish file
since I was touching it to set the escape timeout.
It used to be that way and we recommend `set fish_greeting` (i.e. set to
empty) in the docs - possibly since we check if the variable is defined
on upgrade.
This fails on e.g. an abbr that uses `env a=b`, like the included test demonstrates.
Unfortunately it decreases the speed again (2s vs 2.2s vs 4s original),
but correctness is more important.
- Replace __fish_abbr_escape with `string escape`
- Don't double-parse the key
- Replace IFS magic with string
Together, this seems to speed it up by a factor of about 2.
Unfortunately, nvim will, even when running in a terminal that supports
it, swallow the sequences whole, rendering the displayed text _white_.
This means falling back to 256 colors is the lesser evil as at least a
blue-ish color will display as blue while a red-ish will be red, instead
of both showing white.
nvim's behavior does _not_ change depending on
$NVIM_TUI_ENABLE_TRUE_COLOR or any other option I could find and neovim-qt
exhibits the same behavior.
Fixes#2600.
This patch is currently floated from the NixOS side as part of
https://github.com/NixOS/nixpkgs/pull/12000, but prior versions of the
hook ignore anything but the first argument anyway, so this is
backwards-compatible.
This skips the weird dance where we'd define a simple handler and then
later overwrite with a fancier one, once the first event came in.
It turns out that isn't necessary, as it doesn't actually improve
startup speed because the checks needed to define fancier handlers are fast.
In case we are non-interactive, still define the simple handler, and
keep the default handler for users to switch to.
Unfortunately, there's no standard way to detect support (importantly,
terminfo doesn't encode it), but there's a variety of terminals that
support it that we can detect.
It's better than letting this functionality go to waste.
Check KONSOLE_PROFILE_NAME instead of DBUS_SESSION because Konsole can be compiled without dbus support.
Check ITERM_SESSION_ID's format for 24bit support
This has changed since the last release, just like 24bit support. So if
we check one, we get the other.
Allows the length of each shortened path component to be customized by setting the `fish_prompt_pwd_dir_length` variable to the number of characters to include (plus a leading dot because that's special). Maintains the default behavior of shortening path components to just one character. You can also set `fish_prompt_pwd_dir_length` to an empty or invalid value or 0 to disable shortening completely.