You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Arch Linux, jre-openjdk-headless creates a symlink from /usr/lib/jvm/java-20-openjdk/manto /usr/share/man/ therefore the command fish_update_completions finds all man pages twice. The first time it can generate the completions, but with the second file it ignores all commands because they are already added to already_output_completions.
The simplest way to reproduce this is to pass the same manpage file twice to create_manpage_completions.py.
In most cases this is no issue and it just ignores the last file, because it fails to generate the completions.
But for The Silver Searcher (ag) the second pass falls back to the TypeDeroffManParser and is able to generate a different, but incomplete, completion file and overwrites the previous one.
On Arch Linux, jre-openjdk-headless creates a symlink from
/usr/lib/jvm/java-20-openjdk/manto/usr/share/man/therefore the commandfish_update_completionsfinds all man pages twice. The first time it can generate the completions, but with the second file it ignores all commands because they are already added toalready_output_completions.The simplest way to reproduce this is to pass the same manpage file twice to
create_manpage_completions.py.In most cases this is no issue and it just ignores the last file, because it fails to generate the completions.
But for The Silver Searcher (
ag) the second pass falls back to theTypeDeroffManParserand is able to generate a different, but incomplete, completion file and overwrites the previous one.Reproducing the errors:
python share/tools/create_manpage_completions.py --progress /usr/share/man/man1/grep.1.gz /usr/share/man/man1/grep.1.gz --stdoutpython share/tools/create_manpage_completions.py --progress /usr/share/man/man1/ag.1.gz /usr/share/man/man1/ag.1.gz --stdoutI'd be happy to create a pull request to fix this but I see multiple options:
already_output_completionswhich is done per argumentalready_output_completionsat the start ofparse_manpage_at_pathalready_output_completionsto thebuilt_command_outputto ensure that all options are written to the completions file.I'm not sure how those workarounds would change the behaviour mentioned in
fish-shell/share/tools/create_manpage_completions.py
Line 84 in 56743ae
System Information
fish --version:fish, version 3.6.1uname -a:Linux ng-lenovo-2 5.15.110-2-MANJARO #1 SMP PREEMPT Thu May 4 06:51:53 UTC 2023 x86_64 GNU/Linuxecho $TERM:xterm-kitty