-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
man: not all man pages are listed if MANPATH environment is set #73
Comments
Sadly, the suggested fix doesn't work with the |
Actually, there is another way to get completion candidates (including manual pages in directories in user-supplied $ 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 |
See scop#73. The old code attempts to guess manual names from filenames, but this has a few drawbacks. On one hand the logic to determine the manpath was incorrect, as explained in scop#73. On the other hand, not all manual names correspond to filenames. Both issues are subtle and non-portable as the exact semantics vary from one man program to another. The new code uses "man -k" to find potential completions. This method seems portable and it should be correct -- as long as the man database is up to date. The one delicate detail is parsing the output of "man -k". The proposed version works ok at least with both man-db and mdocml packages.
This includes two tests expected to fail: a. The logic to determine the manpath is incorrect (see scop#73) b. Not all manual names correspond to filenames
Fixes scop#73. The old code attempts to guess manual names from filenames, but this has a few drawbacks. On one hand the logic to determine the manpath was incorrect, as explained in scop#73. On the other hand, not all manual names correspond to filenames. Both issues are subtle and non-portable as the exact semantics vary from one man program to another. The new code uses "man -k" to find potential completions. This method seems portable and it should be correct -- as long as the man database is up to date. The one delicate detail is parsing the output of "man -k". The proposed version works ok at least with both man-db and mdocml packages. The issue with manual names not corresponding to filenames is still broken with man-db, but it seems their bug. It is fixed with mdocml.
This includes two tests expected to fail: a. The logic to determine the manpath is incorrect (see scop#73) b. Not all manual names correspond to filenames
Fixes scop#73. The old code attempts to guess manual names from filenames, but this has a few drawbacks. On one hand the logic to determine the manpath was incorrect, as explained in scop#73. On the other hand, not all manual names correspond to filenames. Both issues are subtle and non-portable as the exact semantics vary from one man program to another. The new code uses "man -k" to find potential completions. This method seems portable and it should be correct -- as long as the man database is up to date. The one delicate detail is parsing the output of "man -k". The proposed version works ok at least with both man-db and mdocml packages. The issue with manual names not corresponding to filenames is still broken with man-db, but it seems their bug. It is fixed with mdocml.
This includes two tests expected to fail: a. The logic to determine the manpath is incorrect (see scop#73) b. Not all manual names correspond to filenames
Fixes scop#73. The old code attempts to guess manual names from filenames, but this has a few drawbacks. On one hand the logic to determine the manpath was incorrect, as explained in scop#73. On the other hand, not all manual names correspond to filenames. Both issues are subtle and non-portable as the exact semantics vary from one man program to another. The new code uses "man -k" to find potential completions. This method seems portable and it should be correct -- as long as the man database is up to date. The one delicate detail is parsing the output of "man -k". The proposed version works ok at least with both man-db and mdocml packages. The issue with manual names not corresponding to filenames is still broken with man-db, but it seems their bug. It is fixed with mdocml.
I think that commit ID e6a4715 fixes this problem. Can this bug be closed? |
It doesn't, as explained above. In my system (void linux, which uses mdocml as man)
So essentially the manpath becomes hardcoded. There is a more robust fix including tests for this and other cases in PR #116. |
If MANPATH environment is set, only man pages located under directories specified by MANPATH are shown.
e.g.,
As explained in manpath.1
I think in the completion for man should use the output of manpath command.
I found this issue on Fedora 24 with Lmod package.
The text was updated successfully, but these errors were encountered: