mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-02 14:01:20 -03:00
create_manpage_completions: Skip more prefixes
This also skips the 192 git- and 64 npm- pages that 1. have better completions already (for the most part) 2. don't have the same name as a command typically in $PATH In doing so it reduces the runtime on my system from 9s to 7s. Granted I have all of these, so that's the best case.
This commit is contained in:
@@ -787,6 +787,26 @@ def parse_manpage_at_path(manpage_path, output_directory):
|
|||||||
if CMDNAME in ignoredcommands:
|
if CMDNAME in ignoredcommands:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Ignore some commands' gazillion man pages
|
||||||
|
# for subcommands - especially things we already have
|
||||||
|
ignored_prefixes = [
|
||||||
|
"bundle-"
|
||||||
|
"cargo-",
|
||||||
|
"ffmpeg-",
|
||||||
|
"flatpak-",
|
||||||
|
"git-",
|
||||||
|
"npm-",
|
||||||
|
"openssl-",
|
||||||
|
"ostree-",
|
||||||
|
"perf-",
|
||||||
|
"perl",
|
||||||
|
"pip-",
|
||||||
|
"zsh"
|
||||||
|
]
|
||||||
|
for prefix in ignored_prefixes:
|
||||||
|
if CMDNAME.startswith(prefix):
|
||||||
|
return
|
||||||
|
|
||||||
# Clear diagnostics
|
# Clear diagnostics
|
||||||
global diagnostic_indent
|
global diagnostic_indent
|
||||||
diagnostic_output[:] = []
|
diagnostic_output[:] = []
|
||||||
@@ -825,12 +845,6 @@ def parse_manpage_at_path(manpage_path, output_directory):
|
|||||||
|
|
||||||
manpage = str(manpage)
|
manpage = str(manpage)
|
||||||
|
|
||||||
# Ignore perl's gazillion man pages
|
|
||||||
ignored_prefixes = ["perl", "zsh"]
|
|
||||||
for prefix in ignored_prefixes:
|
|
||||||
if CMDNAME.startswith(prefix):
|
|
||||||
return
|
|
||||||
|
|
||||||
# Ignore the millions of links to BUILTIN(1)
|
# Ignore the millions of links to BUILTIN(1)
|
||||||
if "BUILTIN 1" in manpage or "builtin.1" in manpage:
|
if "BUILTIN 1" in manpage or "builtin.1" in manpage:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user