We were checking for the $TMUX variable to determine if we were
running under tmux. However when running the tests, the terminal becomes
expect, even though the TMUX variable is still set, so we spew tmux-isms
at expect. Check the value of $TERM for 'screen'.
Since fish began resolving symlinks it broke the running-from-build-dir
detection in fish.cpp if the build directory were a symlink (which is
common on some platforms where the default user HOME directory is a
symlink in the first place, e.g. FreeBSD).
If we read an R_EOF, we'd try to match mappings to it.
In emacs mode, that's not an issue because the generic binding was
always available, but in vi-normal mode there is no generic binding,
so we'd endlessly loop, waiting for another character.
Fixes#5528.
Originally I sought out to configure the foreground color of the
selected text in the pager. After reading a thread on a github issue I
was inpired to do more: now you can conifgure any part of the pager when
selected, and when a row is secondary. More specifically this commit adds the
ability to specify a pager row's:
- Prefix
- Completion text
- Description
- Background
when said row is selected or secondary.
This allows disabling _just_ the informative status.
We still also use the dirty and untracked variables, but only if
informative status hasn't explicitly been enabled.
If either of the two git config variables:
- bash.showDirtyState
- bash.showUntrackedFiles
is explicitly set to false, we will disable informative status, and
fall back on the non-informative version (most likely still with
either dirty or untracked files, since we already use the variables
for that).
These vars are read by the official git prompt, so we use them instead
of inventing our own "fish.showInformativeStatus".
(Note: This also uses $__fish_git_prompt_showdirtystate and friends,
but only when there's nothing set in the repo, and there's really no
reason to set those to false if using the informative status)
Fixes#5551.
[ci skip]
This will print out along with the stuff we've guessed about color
support. We get a lot of bug reports about these messing up rendering,
this is useful diagnostic output.
Ask the system where utilities are available with confstr (POSIX).
This is the same string printed by `getconf PATH`, which likely
includes more directories.
Expands the utility of `type -p foo` by allowing it to print the path to
the script that defines `foo` when `foo` is a valid function that was
sourced from a path on disk (rather than interactively defined).
This does not change the behavior of `type -P`/`type --force-path`,
which should have already been used if the desire was to resolve the
path to an executable file (otherwise the output would have been blank
if a function was shadowing an executable file of the same namea), so no
backwards compatibility issues are expected.
Using printf like
printf "The message"
is unsafe, because if the message contains any formatting characters,
they'll be interpreted.
In this case it's not all that important because the message contains
only filenames of our tests and static strings, but still.
I was surprised to see:
> set_color normal | string escape
\e\[30m\e\(B\e\[m
I only expected to see a sgr0 here.
Cleanup a nearby `else { if (...) {` and comment with a bogus example.