Giter Site home page Giter Site logo

Comments (5)

ackalker avatar ackalker commented on July 23, 2024

Sadly, the suggested fix doesn't work with the mdocml package installed by default in Void Linux, which has neither a manpath command nor a -w option to man (which in this case is a symlink to mandoc). In this case I see no other solution but to process both /etc/man.conf and the MANPATH variable when completing.

from bash-completion.

ackalker avatar ackalker commented on July 23, 2024

Actually, there is another way to get completion candidates (including manual pages in directories in user-supplied MANPATH) using mdocml's apropos command with a regex.
To get all completion candidates for the prefix perlc:

$ echo $MANPATH
:/home/miki/perl5/man/
$ apropos 'Nm~^perlc'|sed -e 's/(.*$//'
perlcall
perlce
perlcheat
perlclib
perlcn
perlcommunity
perlcritic
perlcygwin

Note that this includes the candidate perlcritic, which comes from the corresponding Perl module which I installed locally in /home/miki/perl5. For this to work I needed to run makewhatis as regular user, to create the database /home/miki/perl5/man/mandoc.db, which is used by apropos.

from bash-completion.

tornaria avatar tornaria commented on July 23, 2024

A fix is in 2af2986 (see PR #116), using man -k.

Tested to work with both with man-db and with mdocml. Indeed the PR creates a number of new test cases which include a test for this bug.

from bash-completion.

inconstante avatar inconstante commented on July 23, 2024

I think that commit ID e6a4715 fixes this problem. Can this bug be closed?

from bash-completion.

tornaria avatar tornaria commented on July 23, 2024

It doesn't, as explained above. In my system (void linux, which uses mdocml as man)

$ manpath
bash: manpath: command not found
$ man -w
usage: man [-acfhklw] [-C file] [-M path] [-m path] [-S subsection]
	   [[-s] section] name ...

So essentially the manpath becomes hardcoded.

There is a more robust fix including tests for this and other cases in PR #116.

from bash-completion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.