Nixpkgs: fish_update_completions is broken

Created on 4 Feb 2016  Â·  6Comments  Â·  Source: NixOS/nixpkgs

@ocharles

fish_update_completions
/nix/store/xg3vzlbf3x360gfv0xq1ifsryd7amzcw-man-db-2.7.2/bin/manpath: can't open the manpath configuration file /etc/man_db.conf
No paths specified
bug

Most helpful comment

On NixOS unstable:

~ (master âš¡=) manpath
/home/.nix-profile/share/man:/run/current-system/sw/share/man

So I'm closing this issue. Please reopen if this problem still occurs.

All 6 comments

I get this error, too. I also get that manpath line printed whenever I run man inside of fish, even though man seems to be working. In bash I get no error messages at all.

Fish's man is bound to a function which runs manpath at one point:

quark:~> type man
man is a function with definition
function man --description 'Format and display the on-line manual pages'
        # Work around OS X's "builtin" manpage that everything symlinks to,
        # by prepending our fish datadir to man. This also ensures that man gives fish's
        # man pages priority, without having to put fish's bin directories first in $PATH
        # Temporarily set a MANPATH, unless one is set already
        if not set -q MANPATH
                set -l fish_manpath (dirname $__fish_datadir)/fish/man
                if test -d "$fish_manpath"
                        # Notice local but exported variable
                        set -lx MANPATH "$fish_manpath":(command /nix/store/4f28b69pc7g1j4lwkpwrxgj4ygm7fj6m-man-db-2.7.5/bin/manpath)

                        # Invoke man with this manpath, and we're done
                        command man $argv
                        return
                end
        end

        # If MANPATH is set explicitly, or fish's man pages could not be found,
        # just invoke man normally
        command man $argv
end

fish_update_completions unconditionally runs this Python code which runs manpath: https://github.com/fish-shell/fish-shell/blob/613739ba072deffb7c0447de02c4a5a3ce296add/share/tools/create_manpage_completions.py#L878-L898

Within bash, the mere presence of the man_db package is enough to cause issues like this:

[scott@quark:~]$ man vim

[scott@quark:~]$ nix-shell -p man_db --run 'man vim'
man: can't open the manpath configuration file /etc/man_db.conf

This is the same problem #12097 was experiencing.

So based on #12762:

This doesn't really fix manpath(1) erroring out on NixOS (can't open the manpath configuration file /etc/man_db.conf), but that's a pre-existing issue.

I think the real issue here is manpath being broken, not fish_update_completions.

On NixOS unstable:

~ (master âš¡=) manpath
/home/.nix-profile/share/man:/run/current-system/sw/share/man

So I'm closing this issue. Please reopen if this problem still occurs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lverns picture lverns  Â·  3Comments

yawnt picture yawnt  Â·  3Comments

edolstra picture edolstra  Â·  3Comments

matthiasbeyer picture matthiasbeyer  Â·  3Comments

ayyess picture ayyess  Â·  3Comments