Closed bbugyi200 closed 5 years ago
Can you check the content of $HOME/.mapath
?
Did you mean $HOME/.manpath
? Here are the contents of that file:
MANDATORY_MANPATH /home/bryan/.local/share/man
Hello
(Edit: Only needed for arch linux)
I couldn't find any documentation, which explains how to make man page use $HOME/.manpath .
But you can set the MANPATH variable:
export MANPATH="${HOME}/.local/share/man:"
(You probably want to add this line to your .bashrc).
@SGSSGene Thanks for your help, but that doesn't resolve this issue for me.
@SGSSGene Thanks for your help, but that doesn't resolve this issue for me.
Mhm weird, which linux distribution are you using?
@SGSSGene Gentoo
(My above statement was wrong). If you use ubuntu16.04 or gentoo it should work exactly how it is documented. I am using arch linux and it seems like they have a "lite" version of man installed.
To be able to look something up with man
you need to have viewed it first with cppman
because man
can only look stuff up that is already in the cache.
cppman -m true # activate cppman for man
man std::vector # will not work, not in the cache
cppman std::vector # will look it up and put it in the cache
man std::vector # should work now
Also notice that while cppman can do partial search like cppman vector
you need to do full qualified lookup for man std::vector
(man vector
will not work).
Can you run mandb --create --user-db
? MANPATH
and MANDATORY_MANPATH
were also necessary for me.
Does this issue still exists?
I wound up giving up and finding a different solution. I am unable to retest at the moment.
I too had this issue (cppman
does not take into account the $MANPATH
variable etc.).
So I created this alias in .bashrc
/ .zshrc
:
man() {
/usr/bin/env man $* 2>/dev/null || cppman $*
}
:+1:
Another possible fix (if it fixes the problem add export line to .bashrc to fix permanently):
ln -s {$HOME}/.cache/cppman/cppreference.com {$HOME}/.local/share/man
export MANPATH="${HOME}/.local/share/man:"
mandb
Quick dirty fix:
export MANPATH="${HOME}/.cache/cppman:"
Works but breaks cppman, "cppman -c", "cppman -r", "cppman std::cout" all return "error: file is not a database"
Fixed by clearing cache
cppman -C
for me (Arch Linux) i had to create the ~/.manpath file and rerun cppman -m true
a fix on this end could be to change update_mandb_path
in util.py to create that file if it doesn't exist, instead of aborting.
I ran
cppman -c
and thencppman -m true
butman
andapropos
still cannot find any cpp man pages. I have verified that the man pages are indeed in my filesystem (i.e. thecppman -c
command worked).