Commit Graph

518 Commits

Author SHA1 Message Date
Johannes Altmanninger
a8956d955f Rename the "none" theme to "None"
Most themes use title case, as do the (change)log entries for this
theme.
2021-11-04 18:41:29 +01:00
Johannes Altmanninger
558041f6e1 None theme: Use reverse video for selected pager entry
Otherwise, with a light-theme, the selected entry uses black text with
"bright black" background, which can be low contrast thus hard to read.

The description background is different, maybe we can fix that later.

See #8376
2021-11-04 18:41:29 +01:00
Fabian Homborg
7993987b23 Use cksum in the disco prompt
It's posix, and apparently faster on slow systems. I literally can't
see a measurable difference on mine.
2021-11-03 17:52:44 +01:00
Fabian Homborg
d41b4639f7 Also turn off $fish_color_option
(technically introduced after this)
2021-11-02 21:40:56 +01:00
Fabian Homborg
78e87fe881 Add "None" theme
This basically disables syntax highlighting. That doesn't mean we use
absolutely no colors - the search match, suggestion, selection and the
pager have coloring, but only reverse or brblack.

The idea is that this disables anything that tells you about
the *syntax*, but it still tells you about the state of the
commandline. If we didn't highlight the selection it would be entirely
invisible, and if we didn't highlight the suggestion you would have no
idea where it begins.

So this basically brings colors on-par with bash, where the search
match is colored (in reverse) and suggestions aren't a thing.

An alternative is to add a $fish_highlighting_enabled variable like
the one for suggestions. That's still possible, but would require some
internal changes to avoid coloring some things with $fish_color_normal
and other things with the normal terminal color.

One thing this also does not do is set the git prompt colors. These
are currently disallowed from being set in theme files because they
start with `__fish` instead of just `fish`. We should probably rename
them.
2021-11-02 21:40:56 +01:00
Aaron Gyes
4cfe095367 update angular-route and angular-sanitize to 1.8.2 as well
URLs for source and SHAsums because the minified js is inscrutible:

https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-sanitize.min.js
https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular-route.min.js

32197fa25de2415816c22fd4d512fef407e2df33  angular-route.min.js
8a6e6f02cc69e8c5bfface0d935dc6f65c9d8a05  angular-sanitize.min.js
2021-10-16 22:53:19 -07:00
Aaron Gyes
901d1f1556 fixup last commit 2021-10-16 22:44:08 -07:00
Aaron Gyes
2a0747b9f1 Update AngularJS to 1.8.2 and use Google's minified version
(it's like 170KB instead of 1.3MB)

https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js
32e24fc5f40120fe30ca097235d6c5988f84c927  angular.min.js
2021-10-16 22:41:19 -07:00
Anselm Schüler
475a2afc40
fish_prompt: clarify comment about carried-over status (#8335) 2021-10-05 21:01:13 +02:00
Fabian Homborg
aa58a54224 Webconfig: Add my own colorscheme
Already added my prompt, might a well.
2021-09-03 17:38:34 +02:00
Fabian Homborg
08690e0303 Webconfig: Use theme's name if available
The "name" here refers to the `# name:` line from the .theme file.
That's a much more descriptive name and allows using simpler filenames.
2021-09-03 17:37:54 +02:00
Fabian Homborg
4194977569 Prompt demo: Only the unmatched quote is an error
The text after is normal quoted text since
822b53c67a.

We might want to find nicer error text.

Fixes #8260.
2021-08-30 17:32:55 +02:00
Fabian Homborg
768afadcad Also read home theme directory in webconfig 2021-07-14 18:56:19 +02:00
Fabian Homborg
e021773288 Address review feedback 2021-07-11 11:23:16 +02:00
Fabian Homborg
072d735853 Webconfig: Remove colorschemes from js
This still keeps the Nord and Solarized palettes because we use the
backgrounds in the sample background list.
2021-07-09 20:36:59 +02:00
Fabian Homborg
51a55b25dc Webconfig: Read metadata from themes
This readds the preferred background and url, all read from "# url:"
and "# preferred_background:" comments in the .theme file.
2021-07-09 20:36:59 +02:00
Fabian Homborg
f301639d07 Add metadata to .theme files
Following a "#" comment. Also empty lines, so we have to deal with them.
2021-07-09 20:36:55 +02:00
Fabian Homborg
0e3d7de889 Webconfig: Read colorschemes from .theme files 2021-07-09 19:45:03 +02:00
Fabian Homborg
8091303659 Webconfig: Add colorschemes as ".theme" files
These are simple

var val [val val]

files. Basically the bit in `set -g fish_color_escape 86c1b9` after
the `set -g `. Since we're not going to `source` them, however,
arbitrary code and expansions are unsupported.

Also comments and such don't currently work.

This allows them to be easily readable both from webconfig (next
commit) and the shell (later).
2021-07-09 19:38:59 +02:00
Fabian Homborg
2aec6e5814 Webconfig: Pass colorscheme in one json request
This used to pass each color in a separate url-encoded request, which is
just wasteful.

Also it passed separate parameters for modifiers like bold and
underlined, but never gave them actual values. Instead the color is
passed as one string.

So we just use json, and then iterate over it server-side.
2021-07-09 18:26:51 +02:00
Fabian Homborg
9e46d49dd9 webconfig: Remove tab top border in dark mode 2021-06-10 21:26:03 +02:00
Fabian Homborg
e571902a85 webconfig: Hover more things
The buttons were already supposed to highlight on hover, but the color
difference was barely visible. Crank that up.

Also add a hover color to the tabs, colorschemes, prompts, functions.

The big clickable things.
2021-06-10 21:25:40 +02:00
Fabian Homborg
f6a6537f7b css: Some minor adjustments
Make borders less bright in dark version, add some padding to the body.
2021-06-10 21:00:18 +02:00
Fabian Homborg
e57c998d4c webconfig: Make a bit nicer on smaller screens
Actually remove the margins, distribute the color choices evenly and
switch to small mode a bit earlier.
2021-06-05 11:46:23 +02:00
Fabian Homborg
7a5e192607 Make background a bit more blue, brighter 2021-06-05 11:17:53 +02:00
Fabian Homborg
c2b35d3171 Adjust colors a teensy bit
Make a bit less ultra-dark blue
2021-06-05 11:17:53 +02:00
Fabian Homborg
64bbc8b304 webconfig: Dark mode 2021-06-05 11:17:53 +02:00
Fabian Homborg
5f4dfd9951 webconfig: Remove weird position: absolute
This made the current prompt appear directly under the tab,
disregarding the padding.

That means it looked inconsistent with the colors. (note there's still
less padding on the side, but at least that allows more actual content
- prompts are often fairly wide)
2021-06-03 20:55:36 +02:00
Fabian Homborg
344bd63e0b webconfig: Remove unneeded inline style
This makes changing it harder and is unnecessary
2021-06-02 17:57:48 +02:00
ridiculousfish
f25b9f9831 Make the webconfig HTTP server threaded, fixing a Safari hang
Recently Safari seems to hang with fish webconfig. This is apparently
because Safari is opening a socket and not writing to it, causing
webconfig to hang until the timeout (30 seconds). It's not clear why.

Use ThreadingMixIn so that FishConfigTCPServer can handle more
than one connection at a time. This fixes the hang under Safari.
2021-05-05 13:29:55 -07:00
Fabian Homborg
c55aa48308 Default colorscheme: Change pager prefix color for light terminals
From my checks (gnome-terminal with the "gnome light" colorscheme)
this seems to be the only color that's barely visible in a light
terminal, and it's the only color mentioned in both bug reports.

I'm leaving the artistic decisions to others, this is now *acceptable*
in both.

Note that, because we use universal variables here (hint #7317), this
will only be changed for preexisting installations when the user
reloads the colorscheme.

Fixes #3412
Fixes #3893
2021-05-01 20:16:23 +02:00
Fabian Homborg
0420901cb2 default prompt: Set fish_color_status if unset
Otherwise this'll error with --no-config
2021-05-01 18:59:25 +02:00
Fabian Homborg
e548dca686 Webconfig: Fix initial tab
For some reason the url is now

http://localhost:$PORT/$RANDOM/#!/$TAB

while this created

http://localhost:$PORT/$RANDOM/#$TAB

which redirected to

http://localhost:$PORT/$RANDOM/#!/colors#$TAB

i.e. the "colors" tab with a useless unmatched anchor.
2021-05-01 18:47:49 +02:00
Johannes Altmanninger
daa3ae4be1 fish_config: use background color for some themes search matches
See https://github.com/fish-shell/fish-shell/issues/2442#issuecomment-829636721
2021-04-30 22:13:23 +02:00
Fabian Homborg
2cea5b8eb1 Add a "prompt_login" helper function
This prints a description of the "host". Currently that's

`(chroot:debianchroot) $USER@$hostname`

with the chroot part when needed.

This also switches the default and terlar prompts to use it, the other
prompts have slightly different coloring or logic here.
2021-04-30 17:07:54 +02:00
Fabian Homborg
6aade380c1 Sample prompts: Handle print_pipestatus if TERM=dumb
This is the simple solution of just quoting it. The real solution
would probably handle `set_color` with no color better - #5443.

Fixes #7904.
2021-04-25 09:49:18 +02:00
Fabian Homborg
f21e015f1b webconfig: Make blue, green, red a bit brighter
These were hard to read in the browser, but not in the terminal.

The palette in color.cpp lists #000080 for blue, which is *even darker*. I'm not sure if that's actually a thing - I was under the impression that table was taken from xterm.

Either way, listing it in this color doesn't do anyone any favors. It's just a rough approximation anyway.
2021-04-21 17:26:52 +02:00
Fabian Homborg
152b0ef018 Webconfig: Sort the prompt list
Otherwise this has filesystem order, which on my system is quite
chaotic.

An alternative would be to randomize the order so people see different
prompts each time.
2021-04-21 17:13:03 +02:00
Fabian Homborg
f2364103b4 Sample prompts: Add a simplified version of my own prompt
Some features:

- A nice `►` prompt char with a fallback for non-utf8 systems
- The $PWD is colored depending on its sha, so different directories
  are colored differently, but each directory stays the same
- User@Host is only shown if not on the local machine (ssh or
  virtualization)
- A right prompt with a nice git display, date, duration of the last
  command (if it took over 100ms), and virtualenv
2021-04-21 17:01:05 +02:00
Fabian Homborg
4355636386 webconfig: Handle right prompt
This gets fish to print the right prompt of any sample if it has any,
and then shows it separately.

If there is a right prompt, it will also save it. If not, it will *not* overwrite an existing right prompt.
2021-04-21 17:01:05 +02:00
Fabian Homborg
84087f09d4 webconfig: Remove gigantic padding 2021-04-14 20:49:24 +02:00
Fabian Homborg
7eddf48cfa webconfig: Cleanup running prompts 2021-04-14 19:08:33 +02:00
Fabian Homborg
16d4424f6c webconfig: Only include path in error if we have one
This makes for a super misleading error message.

See #7917.
2021-04-10 11:53:36 +02:00
Fabian Homborg
4239ba133d Sample prompts: Add a "simple" prompt
This should be a simple prompt that doesn't place a huge strain on the
system but communicates the most important information simply and
effectively.

It should be a good jumping off point for making your own prompt.
2021-04-08 11:14:16 +02:00
Fabian Homborg
d4ce5507af Sample prompts: Rename classic+vcs to default
That's what it is, and without the "classic" prompt to compare it
doesn't make any sense anymore.
2021-04-08 11:14:16 +02:00
Fabian Homborg
34d4afac99 Sample prompts: Remove stray space after pipestatus
This would, with the default color, have an ugly red background.

So just remove the space.
2021-04-08 11:14:16 +02:00
Fabian Homborg
db9ac527af Sample prompts: Rename prompts named after a single person
Unless that person directly contributed the prompt.

We name them after a feature - the Scales prompt feature a ">>>" which
kinda looks like fish scales, the "Arrow" prompt starts with a
prominent "➜".

Naming them after people looks like an endorsement of that particular
person, and like they are someone to look up to, especially when they
aren't involved with the project.

The "terlar" and "acidhub" prompts stay for now because they
contributed the prompt themselves, they are also much less prominent.
2021-04-08 11:14:16 +02:00
Fabian Homborg
635a2c13f1 Sample prompts: Use fish_is_root_user
So we don't just check for "root"
2021-04-08 11:14:16 +02:00
Fabian Homborg
2bc2a92c9a Sample prompts: Stop using "git status" just to see if it is dirty
`git status` will descend the entire repo, which is *slooooow*
2021-04-08 11:14:16 +02:00
Fabian Homborg
31f86ed2cf Sample prompts: Use fish_git_prompt format string 2021-04-08 11:14:16 +02:00
Fabian Homborg
0a395b9568 Sample prompts: Remove default settings from informative vcs prompt
Some of these are just the git prompt defaults anyway, so remove them here.
2021-04-08 11:14:16 +02:00
Fabian Homborg
0586715696 Sample prompts: Remove duplicated or less useful prompts
The "classic" prompts are all just variations on a theme, let's just
keep the default classic+vcs.

"Justadollar" is very unlikely to be what you want and also trivial to
write yourself.

I have no idea what screen_savvy even is for - it reacts to "$WINDOW",
but I don't know anything that even uses that variable.

Lonetwin is just unremarkable, and the debian chroot prompt has one special feature that should be integrated into the other prompts.
2021-04-08 11:14:16 +02:00
Fabian Homborg
75a4e28e4f Manpage generator: Give better error when we can't understand manpath
This would just say "No paths specified", which is *true*, but then we
typically don't give paths, because we figure out the man path.
2021-03-26 19:32:14 +01:00
Johannes Altmanninger
516a70d9cb Misc cleanups
Some as suggested by lgtm.com
2021-03-21 19:41:36 +01:00
Fabian Homborg
c23f311956 pythonista prompt: Remove single-argument test 2021-03-11 16:55:17 +01:00
ridiculousfish
7e8b8345e7 Fix some graphical glitches in fish_config
fish_config has some shadows and other elements which don't align
propertly. Fix these, and apply some other miscellaneous polish.

Fixes #7811
2021-03-10 18:46:06 -08:00
Ilya Grigoriev
fe70c29c48 Incorporate black suggestions & rearrange imports slightly
This isn't really necessary, but it makes the file look nicer to
my eyes. Let me know if you want me to remove this commit.
2021-03-07 09:42:41 +01:00
Ilya Grigoriev
f725cd402d Make help and fish_config work on Chrome OS
When `fish` is running in the Chrome OS Linux VM (Crostini),
both `help` and `fish_config` opened a "file not found"
page. That is because on Crostini, `BROWSER` is usually set to
`garcon-url-handler`, which opens URLs in the host OS Chrome
browser. That browser lacks access to the Linux file system.

This commit fixes these commands. `help` now opens the URL on
www.fishshell.com.  `fish_config` now opens the URL for the
server it starts. Previously, it opened a local file that
redirects to the same URL.

In the case of `help`, the situation could be improved further
by starting a web server to serve help. I don't know of another
way to access `/share/fish` from outside the VM without user
intervention, and I think that might be a part of the security
model for the Crostini VM.

It's hard to write a test for this. I checked that `help math`,
`python2 webconfig.py`, and `python3 webconfig.py` work on my
machine running in Crostini.
2021-03-07 09:42:41 +01:00
nosed1ve
aa608a42ff
Ensure web_config works on WSL (#7742)
* Ensure web_config works on WSL

web_config could sometimes fail on WSL if the user chose not to append
windows directories to their linux $PATH. This change ensures that the
cmd.exe executable is found in most cases even if windows directories
are not appended to $PATH on linux.

An error message letting the user know that cmd.exe was not found, and
that they should add the cmd.exe dir to their $PATH before running
fish_config is displayed if cmd.exe is still not found.

* Exit with a non 0 status code if cmd.exe is not found
2021-02-25 16:21:34 +01:00
Fabian Homborg
477587a4d4 webconfig: Remove more margins on small screens
This still showed the background gradient, which is just a waste and
looks weird.

Instead make the actual content fullscreen (except for the border
radius, for now)
2021-02-15 20:07:24 +01:00
ridiculousfish
c35535dee7 Do not show the history variable in fish_config
The history variable may be so large that it hangs the browser, as
spotted in #7714. Omit this from the variable list.
2021-02-15 10:47:13 -08:00
Johannes Altmanninger
330883b6fd Run fish_indent on share/**.fish
This is mostly to show that some of my following indent changes don't break
current behavior.
2021-02-08 07:31:33 +01:00
Ilya Grigoriev
254729f86d Fix Alt+L when using the "Informative" prompt
I ran into problems described in https://github.com/fish-shell/fish-shell/issues/718 when using this prompt. This seems to be a bug in the prompt -- this change fixes it, at least on my system. 

I tried this in tmux (TERM=screen) and gnome-terminal (TERM=xterm-256) with fish 3.1.2, on Linux.
2021-02-07 08:54:02 +01:00
Fabian Homborg
a78ec8c8cb webconfig: Use flexbox for the colorschemes
This had a classic float:left layout, which led to awkward gaps and
stuff.

Since what we want here is basically 100% exactly a flexbox, just use that.

Note: No flexbox for the prompts, atm, because having multiple of
those next to each other looks a bit weird.
2021-01-26 20:47:18 +01:00
Fabian Homborg
b722e9ae32 sample_prompts/sorin: Move the right prompt into the prompt function
Our old problem with fish_config
2021-01-26 19:23:59 +01:00
Henrik Hermansen
1d1e8a54a0 Properly fix git diff check 2021-01-13 14:36:41 +01:00
Henrik Hermansen
eaf7431c38 Fix Git status in Acidhub prompt
Fix 1: The --quiet flag must be at the end of the command. The way it was I would never get any status symbol in my prompt as the command failed.
Fix 2: After adding files to git, but before committing them, git status is unsorted. This gave me the output "M A M A" after `uniq`, which resulted in 4 status symbols instead of 2. Sorting them before filtering them fixed the problem.
2021-01-13 14:36:41 +01:00
Edouard Lopez
7c704ce545 use original theme repo URL 2021-01-04 13:54:58 +01:00
Fabian Homborg
768defeb8e webconfig: Stop proscribing a specific font-family
There's a macOS bug with Source Code Pro that makes it unable to be
colored. Since that makes webconfig unusable, stop recommending it.

Instead, we just pick the default monospace font for the system.
2021-01-04 12:23:29 +01:00
Fabian Homborg
627fff7971 webconfig: Comment utf-8 assumption 2021-01-03 15:48:39 +01:00
Fabian Homborg
17501bcc57 webconfig: Error out on form-data
Just in case this happens anywhere return a sensible error instead of
mishandling it.
2021-01-03 15:27:46 +01:00
Fabian Homborg
e332555596 Webconfig: Remove dependency on cgi module
This is slated for removal in python 3.10, see
https://www.python.org/dev/peps/pep-0594/#cgi.

We currently only use it for three things:

- escape_html in old python versions that didn't have that in the html
  module
- Parsing multipart/form-data
- Figuring out the charset for json

We keep the first one - if loading escape_html from html fails we fall
back to cgi.

We remove the second - I can't find any case where we use
multipart/form-data. Any place we post data we either explicitly pass
application/x-www-form-urlencoded or implicitly use application/json.

The third is the tricky bit. This drops charset detection under the
assumption that we're never going to encounter anything other than
utf-8 (or ascii, which is a utf-8 subset). I'm not sure that holds,
but if it doesn't we can just add a regex to parse the charset.
2021-01-03 15:16:47 +01:00
Fabian Homborg
f547c2fda8 Webconfig: Fix customizing ayu themes
These used a different object format, so they were passed to
interpret_color wrong.

Because the "common" and "syntax" division doesn't really help all
that much, let's just flatten the thing.

See #7596.
2021-01-02 16:22:12 +01:00
Edouard Lopez
c8b400bfad register ayu colorscheme 2021-01-01 11:36:13 +01:00
Edouard Lopez
9272703359 add ayu colorscheme 2021-01-01 11:36:13 +01:00
Fabian Homborg
a4e2a3c049 Reformat web_config css with prettier
I'm not a fan of how prettier formats code, but this file was a mess
with inconsistent indentation, and the result is okay.

[ci skip]
2020-12-10 16:27:00 +01:00
Fabian Homborg
1d7978d282 web_config/colors: Fix div tag
This wasn't closed correctly, and by closed I mean it lacked a `>`.

[ci skip]
2020-12-10 16:27:00 +01:00
Fabian Homborg
ab5d7f80d0 Restyle codebase
And again clang-format does something I don't like:

-    if (found != end && std::strncmp(found->name, name, len) == 0 && found->name[len] == 0) return found;
+    if (found != end && std::strncmp(found->name, name, len) == 0 && found->name[len] == 0)
+        return found;

I *know* this is a bit of a long line. I would still quite like having
no brace-less multi-line if *ever*. Either put the body on the same
line, or add braces.

Blergh
2020-12-06 15:39:54 +01:00
Fabian Homborg
d9b7cdc43b Webconfig: Move the style to the body, not the ancestor
This allow box shadows to work and removes the last margins when under
700px wide.

I'm not entirely sure we need the ancestor anymore.
2020-12-05 14:47:26 +01:00
Fabian Homborg
96dd8d511e Webconfig: Let it work better on small screens
This allows it to basically work down to quite small widths.
2020-12-04 17:08:45 +01:00
Fabian Homborg
8c5f733e20 Webconfig: Fix error message
For some reason this didn't like the min-height inside the ng-style
thing.
2020-12-04 17:08:45 +01:00
Fabian Homborg
6418e8ea68 Webconfig: Let theme match help and fishshell.com
More consistency is nice.
2020-12-04 17:08:45 +01:00
Fabian Homborg
aaf5bfc25f Webconfig: Support reading term24bit colors for the prompt display
Otherwise this would break colors if fish detected a truecolor terminal.
2020-12-04 17:08:45 +01:00
Fabian Homborg
9de809ee98 webconfig: Remove LooseVersion
This writes super cheesy version checking, but allows us to remove
distutils.

Fixes #7514.

Hat tip @zanchey for the check.
2020-11-28 16:12:21 +01:00
Fabian Homborg
eb517e0bdd webconfig: Determine if we're termux without distutils
Just copy that "find an executable" code we already have,
the one that was commented with "oh, btw, distutils.spawn.find_executable is bad",
and use it here as well.

Work towards #7514.
2020-11-28 16:11:09 +01:00
Fabian Homborg
2e55e34544 Reformat 2020-11-22 14:39:48 +01:00
Johannes Altmanninger
55bc6a27c6 Make prompts forward compatible with fish 3.1.2 by passing locally exported variable
Commit 5d135d555 (prompts: fix pipestatus for jobs prefixed with "not")
introduced a backwards compatibility hack about adding an optional argument
to __fish_print_pipestatus. This hack would break downgrading to fish 3.1.2
if the user copied the new prompt to their config - they would get a backtrace
on every prompt which is arguably worse than the patch's minor improvement.

This does away with the error trace - old fish just won't show the fancy
new pipestatus on `not true`.

Implemented by passing the last $status as the poor man's kwarg, which works
since 3.1.0 (9b86d5dd1 Export all local exported variables in a new scope).

The prompts don't work with fish 3.0.0 or older; downgrading does not seem
too important in general but I think this patch is an okay simplification.
2020-09-05 09:58:55 +02:00
Johannes Altmanninger
89724f9366 prompts: guard against missing fish_is_root_user
Prevents error spew when running one of these prompt on fish 3.1.2.
2020-09-05 09:48:47 +02:00
Fabian Homborg
ee84223138 Webconfig: Run prompts one at a time if necessary
Termux doesn't support sem_open, which means python doesn't support
multiprocessing.

So we have to resort to brute force.

Fixes #7298.
2020-08-31 16:50:07 +02:00
Fabian Homborg
6a21a2ce16 Prompts: Don't color space before pipestatus
These passed " [" to __fish_print_pipestatus as the left brace.

If the color contained a background, that would also color the space
in, leading to a weird unbalanced space before and none after.

Instead, prepend the whitespace when printing later.

[ci skip]
2020-08-27 18:41:38 +02:00
Fabian Homborg
f88c3389da fish_prompt: Don't do work outside of the function
That just makes it annoying to use `funced`.

Also sync the classic_vcs prompt again.
2020-08-27 17:07:23 +02:00
Charles Gould
c2fe319af0 fish_config: 'Webify' color definitions
The colors defined in `colorutils.js` are specified in
fish format, and therefore RGB values lack the leading
`#` character and do not fully follow the html/css spec
(w3.org/TR/css-color-4/#typedef-hex-color).

Web config sends these values as-is to the browser,
without first converting to a browser-friendly format.
While this (somehow) works for the most part, a few
colors get lost along the way and do not display in
the customization selector nor in the preview when
selected. This behavior was seen in Firefox.

To fix this, let's prepend the missing '#' character
to all RGB colors defined in `colorutils.js`.
2020-07-11 13:51:52 -07:00
MaxVerevkin
aff2e76021 create_manpage_completions.py: introduce TypeScdocManParser which is capable of parsing scdoc manpages
This greatly improves generated completions for scdoc man pages, see #7187.
2020-07-11 17:39:36 +02:00
MaxVerevkin
d3661b3808 create_manpage_completions.py: add .SH and .UN sections in Type2ManParser
This improves some generated completions, for example:

	diff -u completions.old/g3topbm.fish completions.new/g3topbm.fish
	+complete -c g3topbm -o stop_error -d 'This option tells g3topbm to fail when it finds a problem in the input'
	-complete -c g3topbm -o stop_error
2020-07-11 17:36:07 +02:00
MaxVerevkin
23c78a74e4 create_manpage_completions.py: do not use '|' in '[]' in regex 2020-07-11 15:52:16 +02:00
MaxVerevkin
4f867ce513 create_manpage_completions.py: refactor 2020-07-11 15:52:16 +02:00
MaxVerevkin
d1ad143cf1 create_manpage_completions.py: refactor: clean up parse_manpage_at_path 2020-07-11 15:52:16 +02:00
MaxVerevkin
75f93a590e create_manpage_completions.py: refactor: clean up parse_and_output_man_pages 2020-07-11 15:52:16 +02:00
MaxVerevkin
0d863378ea create_manpage_completions.py: refactor: remove unnecessary 'skip' 2020-07-11 15:52:16 +02:00
Johannes Altmanninger
0c9e651fdf create_manpage_completions.py: use correct capture group 2020-07-11 15:46:33 +02:00