[texdoc] Almost ready for v3.0!

Norbert Preining norbert at preining.info
Fri Jun 1 02:41:47 CEST 2018

Hi Reinhard,

>   complete -W "$(awk '/^name/ {print $2}' $(kpsewhich -var-value TEXMFROOT)/tlpkg/texlive.tlpdb)" texdoc

Yeah, the awk trick is good, only that I am not good in awk.

BUT, you lost the part
  grep -v '\.'
which is necessary (well, not strictly, but for correctness) of
filtering out those lines of 

So the correct one is

  complete -W "$(awk '/^name[^.]*$/ {print $2}' $(kpsewhich -var-value TEXMFROOT)/tlpkg/texlive.tlpdb)" texdoc

  compctl -k "(($(awk '/^name[^.]*/ {print $2}' $(kpsewhich -var-value TEXMFROOT)/tlpkg/texlive.tlpdb)))" texdoc

>   /usr/share/bash-completion/texdoc
> to the Debian TeX Live distribution?  That would be great because

Maybe ... we could start a TL completion project ... but honestly, I
have uninstalled most of the completion stuff since it is fundamentally
broken by design. Completion often tries to guess what I want to write,
and often refuses to complete what is an acceptable invocation, just not
one that was thought of by the original completion writers.

It pissed me off quite a lot that for some time file name completion was
disabled for some commands, etc etc.

Still I can add that to Debian TeX LIve package.

> completion then works out of the box.  Another advantage is that the
> script can assign /path/to/texlive.tlpdb to a variable so that
> kpsewhich isn't needed at run-time.

Unfortunately we don't ship tlpdb in Debian by now ;-)



PREINING Norbert                               http://www.preining.info
Accelia Inc.     +    JAIST     +    TeX Live     +    Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13

More information about the texdoc mailing list