Closes: https://github.com/fish-shell/fish-shell/issues/1060
'ansi' should always be present (tested on Solaris, Linux, FreeBSD,
Darwin).
Also overrides TERM so that other programs behave consistently e.g.
fish_pager.
The error message makes no specific mention of terminfo or termcap as
these vary across operating systems.
(r+ @ridiculousfish with thanks)
The intention of the block removed appears to be to indent wrapped lines to the column the line started at. What actually happens is that all wrapped lines wrap to column 0.
After adding the sticky short prompt feature, the block removed caused a bug with wrapping wide characters in addition to not appearing to change anything else.
Wide characters would change between wrapping to column 0 and the column the command started at, depending on what column the wide character was at before wrapping.
I am keeping the existing behavior rather than restoring the block's original intention. If the original intention should be restored, it should be on a different branch.
From the Python webbrowser documentation:
"If text-mode browsers are used, the calling process will block until the user exits the browser."
Running fish_config on an ssh server with no GUI browser will open a CLI browser which blocks and stops the server from handling requests.
Using multiprocess to run the server in the background lets CLI browsers access the page, but the page is unusable.
For now, disable CLI browsers and recommend opening the page in a graphical browser.
In the future, maybe write a CLI utility to change prompts and delete history items.
printf expects unsigned long (%lu) argument, however, size_t doesn't
have to be declared as such. As %zu is C99 (but not C++), it shouldn't
be used directly. Instead, I have to cast value to the correct type.
When launching the first instance of fish and fishd is not launched already, this should not be considered an error as long as it can be launched. So ignore the first failure of connect(), as the calling function get_socket() will try again. May need a bit of cleanup.
Prefer the standard library lzma module if available. This change prevents
using the backports-lzma when it is installed for a version of Python that
already has the lzma module in its standard library.
- expunge LIBS_COMMON, it doesn't get used anywhere
- don't reset LIBS to empty
- move the gettext test as every binary depends on it
- only include one set of libraries
They cannot be used as arguments (Perl thinks it's version check, but
version checks are pointless for oneliners), and Debian puts path
containing version depending directories (like 5.14.2) in Perl path.
There is no need to explicitly check for two arguments and set --bold.
Instead the user can simply "set __fish_git_prompt_color_flags --bold
red".
The current check violates the expectation set by the documentation
that you can use any set_color argument as the current code interprets
"--bold red" as "--bold --bold" instead.
Plus, by passing the full contents of the variable directly, the user
can do more adventurous things like set the background as well.
git.git's git-prompt may not contain a configurable prefix, but it
does display a space before the upstream information when displaying
verbose information. Rather than using a space always or never,
default to a space whenever verbose is in showupstream.
Adds a "name" option to __fish_git_prompt_showupstream that shows an
abbreviated branch name when the upstream type is verbose.
Based on git.git 1f6806c: git-prompt.sh: optionally show upstream
branch name