mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00: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:
parent
5f672ece84
commit
e09f7e4e4d
1 changed files with 20 additions and 6 deletions
|
@ -787,6 +787,26 @@ def parse_manpage_at_path(manpage_path, output_directory):
|
|||
if CMDNAME in ignoredcommands:
|
||||
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
|
||||
global diagnostic_indent
|
||||
diagnostic_output[:] = []
|
||||
|
@ -825,12 +845,6 @@ def parse_manpage_at_path(manpage_path, output_directory):
|
|||
|
||||
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)
|
||||
if "BUILTIN 1" in manpage or "builtin.1" in manpage:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue