These control the disambiguation between ctrl-j and ctrl-m.
This can cause the enter key to send a ctrl-m, which programs might be
unprepared for.
(This is why you need to do `stty sane<ctrl-j>`)
The `reserve` here can, under certain circumstances, reserve more than
strictly needed.
The simple workaround is to just never look at more than we feed in.
(really what we'd *want* is to look at the length of the *color
names*, but those are wchar, so length lookup is crappy NULL-lookup)
This had this weird "pass along the sha, then check" logic to it which
is entirely unnecessary.
This function just says when something is staged, nothing more. Why
that is you can figure out for yourself.
This makes it easier to call this function, and it no longer prints an
empty line if nothing is staged.
This was profiled to be a hotspot during startup. The usage of
wcscasecmp in a loop caused repeated transforms to lowercase, which is
incredibly slow for wide characters.
This makes it possible to expand the signals checked by the type. I can't merge
the sigttin fixes for #7060 yet because they introduce new breakage, but this
will make merging any future fix easier.
This was intended to stop showing the user "unimportant" variables,
but it just didn't complete them entirely, even if the current token
starts with a dunder (or `fish` of all things!).
Because completions sort `_` last, let's just complete these always
and let the user filter them.
This wasn't added to the prompt status order, so it was computed and
then not used for the informative prompt.
We still check later if we should compute it, so this is harmless if
showstashstate is unset.
Fixes#7136.
In #7133, neovim crashing caused "OPOST" to be turned off, which
caused a weird staircase display.
So we just force a set of settings that don't seem useful to change to
avoid breaking the terminal with something like that.
Fixes#7133.
A broken/missing optspec or `--` is a bug in the script using
argparse, an unknown option or invalid argument is a bug in using that script.
So in the former case print a stacktrace, because the person writing
the `argparse` call is at fault, in the latter don't.
Fixes#6703.
The `snap interfaces` command prints out a deprecation notice to stderr. This breaks the completion
support for interfaces, connect and disconnect commands like so:
```
$ snap connect <TAB>error: no interfaces found
error: no interfaces found
...
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
error: no interfaces found
error: no interfaces found
'snap interfaces' is deprecated; use 'snap connections'.
```
Ultimately, the snap command completion should switch to `snap connections`. However, for now try to
workaround the notice by redirecting stderr.
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
This was sometimes slightly annoying in porting.
5 is enough most of the time, 10 should be enough basically always,
without being too annoying if you don't need it.