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 · 3 comments · Fixed by #3886
Closed

opam 2.0.4 clobbers MANPATH on fish #3878

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

Comments

@talex5
Copy link

@talex5 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

This comment has been minimized.

Copy link
Collaborator

@rjbou rjbou commented Jun 24, 2019

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

@talex5

This comment has been minimized.

Copy link
Author

@talex5 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').

@AltGr AltGr closed this in #3886 Jun 27, 2019
@rjbou rjbou added this to the 2.1.0 milestone Jun 27, 2019
@talex5

This comment has been minimized.

Copy link
Author

@talex5 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.

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

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.