"socket.has_ipv6" is basically useless - it tells you python has
been *compiled* with ipv6 support.
Instead just try ipv6 and if that fails with EAFNOSUPPORT (checking
the actual errno), try v4.
Yes, I explicitly do not care to test this on python2.
Fixes#3857
These are used in prompts only, and it feels weird not to have them.
In practice, fish_color_host_remote would not be used at all (just
because you switched from the default theme!), while fish_color_status
would fall back on a different value.
That'll be adjusted in the next commit.
This removes the awkward secondary logic.
Note that we still ship a function called `__terlar_git_prompt`
because people who picked the prompt will still be calling it - we
don't update the prompt.
The best effort parser over-eagerly strips all extensions off a manual
page file's basename, hence commands containing dots will output
completions for a different command.
Prominent examples are the mkfs.*(8) and fsck.*(8) families, e.g.
completions for mkfs.xfs.8.gz are generated for the command `mkfs`
is not only incorrect but can also filename collisions in case .fish
files for multiple commands are put into the same directory.
Thus do not strip everything past the first dot from the left, but
instead merely strip expected extensions from the right.
This is a follow-up to #8811, which fixed fish_config on newer versions of
Sailfish OS.
Using the previous method to open the fish_config URL on Sailfish OS worked
only on 4.4 (and 4.3 IIRC), but not on older OS versions. Opening the URL
using xdg-open works well with new and old OS version, and has been tested on
- Sony Xperia 10 II running SFOS 4.4 aarch64
- Sony Xperia XA2 Ultra running SFOS 4.4 armv7hl
- Sony Xperia X running SFOS 4.1 armv7hl
- Jolla Phone running SFOS 3.4 armv7hl
Closes#8872
Otherwise this was 100% monospace.
But since we have a specific list of fonts that we have checked, let's
use the same list instead of just adding "Helvetica" again.
Since the color previews are now wider, we had quite a wide range
where there would only be one. Remove the border around the content
earlier so windows with 1000px width still get two previews in a row.
(making the text shorter would also be an option here)
This makes the container fit the content, otherwise we'd be cutting
off the "> quack &" part of the first line.
Also while we're here increase the line-height a bit to give it more
breathing room, and increase the font size juuust a smidge.
Reduce margins and increase padding to make it less cramped.
This takes the changes from 03b23dd1b6
and applies them to the .theme version as well.
(note: It's *possible* to just go through fish_config in future, but
we do not want to do that right now because that can have issues on
upgrade)
This sets the variable to the background value of
$fish_color_search_match, which fixes the case where you switch from a
theme with a set selected background (like our default, now) to one without.
Unfortunately the normal font families like "sans-serif" and
"monospace" are basically broken because the browser defaults are
decades old.
TODO: Inline code is barely distinguishable.
Instead of weirdly smearing the color, simply increase the values
until they are bright enough.
This prevents /tmp from being white, and guarantees visible colors for
all directories.
The `name` attribute I used in commit f725cd402d
is undocumented, and [someone discovered] that it does not exist for one
possible browser on MacOS. This should make the code work correctly even in that case.
This probably doesn't currently cause a problem, at least when
`isMacOS10_12_5_OrLater()` is true, because of the ordering of the if
statements in the `runThing` function.
[someone discovered]: https://bugs.python.org/issue43424#msg409087
This is a stop gap. Ideally setting a theme would be idempotent. You
set it, all colors change to match it, even the ones it does not
specify.
However, I do not believe we can *erase* colors that aren't set, and
we don't currently do so in the CLI version. So skip setting these at
all, for now.
If a color is mentioned but empty, it will be set to empty.
If the theme says "brgreen", that's what we want the variable to say
after.
This used to translate it through our palette, so it ended up as
00ff00, which isn't the same.
This still keeps the idea that colors that aren't in the palette are
better, and it does it in a slightly roundabout way (translate color
string to rgb string, see if the rgb string is a key in that
translation dictionary), but it should work for now.
Theoretically if this only includes simple characters, it won't cause
any issues. We already validate in other places but it doesn't hurt to
do this twice.
Now that we have modifiers and can have backgrounds and such, simply
setting it as css style doesn't cut it.
So let's stop validating for now, the worst that can happen is that
the color isn't rendered.
This just simply passed the "color" value, which is just the
foreground color string.
Instead, we pass the actual object back, with the modifiers as bools
and foreground/background separate.
Our themes don't use background a lot, except in the pager, so this
never really came up.