You are not logged in.

#1 2017-01-03 23:00:16

Gradient
Member
Registered: 2013-05-19
Posts: 101

[Solved] man auto-completions not working anymore

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

#2 2017-01-03 23:08:11

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [Solved] man auto-completions not working anymore

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

#3 2017-01-03 23:28:56

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: [Solved] man auto-completions not working anymore

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

#4 2017-01-03 23:59:33

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: [Solved] man auto-completions not working anymore

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

#5 2017-01-04 00:06:12

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] man auto-completions not working anymore

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

#6 2017-01-04 01:19:18

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: [Solved] man auto-completions not working anymore

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

Board footer

Powered by FluxBB