1. When the wall time and cpu time rows has different units
e.x. running multiple cores
2. When duration is around 1E3 or 1E6 microseconds
printf("%6.2F", 999.995) gives 1000.00 which is 7 digits
The output of
systemctl list-units
seems to include a marker of '●' or '*' for some units, even if the
output is not going to a terminal and "--no-legend" and "--no-pager"
are given. This appears
to be a recent development, and there does not appear to be a flag to
disable it.
So we simply filter it out in the completions to once again hopefully
offer the actual units.
Fixes#6740
Even if $DISPLAY is unset, xdg-open can be useful, and on systems that
have xdg-open, "open" is most likely some god awful outdated thing
called "openvt" elsewhere.
Fixes#6739
[ci skip]
If given a prompt that includes a non-ascii char and a C locale, fish
currently fails to properly display it.
So you set `function fish_prompt; echo 😃; end` and it shows empty
space.
While the underlying cause is obviously using a C locale and non-C
characters to begin with, this is an unacceptable failure mode.
Apparently I misunderstood wcstombs, so I inadvertently broke this in
2b0b3d3 while trying to fix 5134949's crash.
Just return the offending bit to pre-5134949 levels, so instead of an
infinite recursion we just call a lame function a couple of times.
This tries to see if quotes guard some expansion from happening. If it
detects a "weird" character it'll leave the quotes in place, even in
some cases where it might not trigger.
So
for i in 'c' 'color'
turns into
for i in c color
The rationale here is that these quotes are useless, wasting
space (and line length), but more importantly that they are
superstitions. They don't do anything, but look like they do.
The counter argument is that they can be kept in case of later
changes, or that they make the intent clear - "this is supposed to be
a string we pass".
This means you can install multiple architectures of fish (eg x86 and
x86_64) alongside each other, using the same fish-common package.
Idea from the Debian fish package (version 3.1.0-1.1) by Punit Agrawal
<punit@debian.org>.
This teaches the reader fast-path to use self-insert-notfirst, allowing
it to handle spaces. This greatly increases the performance of paste by
reducing redraws.
Fixes#6603. Somewhat improves #6704
This adds basic support for self-insert-notfirst. When we see a
self-insert-nonempty char event, we kick it back to the outer loop,
which only inserts the character if the cursor is not at the beginning.
This adds a new readline command self-insert-notfirst, which is
analogous to self-insert, except that it does nothing if the cursor
is at the beginning. This will serve as a higher-performance implementation
for stripping leading spaces on paste.
Fixes#6138
Naturally this does not work for many other editors/aliases,
but it's still nice that we can make it work for some common
editors without requiring any configuration.
Of course this approach is not terribly flexible; but it's
alwyas possible to just wrap edit_command_buffer and set an
EDITOR that knows about the cursor position. It doesn't
feel important enough to add a configuration option.
Using a local variable means we have to expand it when loading the
completion. With this approach, the content of the variable will be
expanded, so escape it.