You are not logged in.
Some time ago, man auto-completions stopped working. My system is up-to-date and I still have the bash-completion package installed. Did something change in bash or bash-completion packages to make man auto-completions not work anymore.
If I type the command
$ complete -c man
then, man auto-completions work again. Why do I need to do that now? Is it really the right fix?
Last edited by Gradient (2017-01-04 01:19:54)
Offline
Works fine here -- both zsh and Bash mechanisms.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
I think I am progressing on this issue.
Trying to source any file in /usr/share/bash-completion/completions with a command like bash sudo seems to work except when I do bash man which produces this output:
man: line 3: _userland: command not found
man: line 4: return: can only `return' from a function or sourced script
What is that _userland command on line 3? Executing _userland GNU produces no output (no error), but when I create a script with only that command, I get a "command not found".
Offline
My previous comment is not the problem.
In my .bashrc, I had this line:
export MANPATH=/usr/local/texlive/2015/texmf-dist/doc/man:$MANPATH
Commenting this line fixes my problem. $MANPATH is empty and if I set it to any non-empty value, man auto-completions stop working. Is it new that $MANPATH is empty?
Offline
You should never set the manpath yourself (and indeed it has been empty for a very, very long time), since man is much smarter than you are at finding manpages as long as you leave it alone. Try adding that directory to your /etc/man_db.conf instead.
Last edited by eschwartz (2017-01-04 00:18:08)
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
This line has been there for a few years now without issue. So I assume the man command has changed its behaviour regarding how it treats a non empty $MANPATH. I have removed that line from .bashrc.
Solved! Thanks
Offline