Skip to content
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

opam 2.0.4 clobbers MANPATH on fish #3878

Closed
talex5 opened this issue Jun 20, 2019 · 4 comments · Fixed by #3886
Closed

opam 2.0.4 clobbers MANPATH on fish #3878

talex5 opened this issue Jun 20, 2019 · 4 comments · Fixed by #3886
Milestone

Comments

@talex5
Copy link
Contributor

talex5 commented Jun 20, 2019

There needs to be a leading : in MANPATH so that the default paths are still used. It seems that opam does this for other shells, but not for fish:

~ $ opam config env --shell=bash | grep MANPATH
MANPATH=':/home/user/.opam/4.07.0/man'; export MANPATH;
~ $ opam config env --shell=zsh  | grep MANPATH
MANPATH=':/home/user/.opam/4.07.0/man'; export MANPATH;
~ $ opam config env --shell=fish | grep MANPATH
builtin -n | /bin/sh -c 'grep -q \'^argparse$\'' 1>/dev/null 2>/dev/null; and
set -gx MANPATH '/home/user/.opam/4.07.0/man';

The result is e.g.

~ $ man ls
No manual entry for ls

(see also #3319)

~ $ opam config report
# opam config report
# opam-version      2.0.4 
# self-upgrade      no
# system            arch=x86_64 os=linux os-distribution=debian os-version=10
# solver            builtin-mccs+glpk
# install-criteria  -removed,-count[version-lag,request],-count[version-lag,changed],-changed
# upgrade-criteria  -removed,-count[version-lag,solution],-new
# jobs              3
# repositories      1 (http), 1 (version-controlled) (default repo at 1b1f3945)
# pinned            13 (git), 1 (rsync)
# current-switch    4.07.0
@rjbou
Copy link
Collaborator

rjbou commented Jun 24, 2019

Thanks for the report.
What is your fish version ? It seems related to #3728.
/cc @gregory-nisbet

@talex5
Copy link
Contributor Author

talex5 commented Jun 24, 2019

~ $ fish --version
fish, version 3.0.2

But you don't need fish installed to see the bug. Just do opam config env --shell=fish | grep MANPATH and you can see that the : is missing ('/home/opam/.opam/4.07/man' should be ':/home/opam/.opam/4.07/man').

@rjbou rjbou added this to the 2.1.0 milestone Jun 27, 2019
@talex5
Copy link
Contributor Author

talex5 commented Jun 27, 2019

Thanks. BTW, I noticed that man on opam-installed binaries works fine even without MANPATH being set. Running man -d, I see:

path directory /home/user/.opam/4.07.0/bin is not in the config file
but does have a ../man, man, ../share/man, or share/man subdirectory
adding /home/user/.opam/4.07.0/man to manpath

This is on Debian 10; I don't know how widespread this feature is.

@robin-a-meade
Copy link

I just wanted to note for any future MANPATH troubleshooters that the output of manpath -d no longer includes the helpful but does have a ../man, man, ../share/man, or share/man subdirectory text. It was removed in the following commit:

https://git.savannah.nongnu.org/cgit/man-db.git/commit/?id=8197d7824f814c5d4b992b4c8730b5b0f7ec589a

(Mirrored here:
qunixorg/man-db@8197d78#diff-af71d1fb8a7162c40d7e7e3d62679bc5fa7ffce53d20966998b0f3e66af1ade6 )

The comment by @talex5 above helped me figure out what was going on. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants