When mount is enabled for bash-completion on linux it will try to load /etc/bash_completion.d/mount.linux instead of /etc/bash_completion.d/mount, as the last says in the begining of the file... Reproducible: Always Steps to Reproduce: 1.enable mount for bash-completion 2.prepare bash to use bash-completion 3.start bash... the file is in ... /usr/share/bash-completion/mount.linux so the file /etc/bash_completion.d/mount needs some fix in the first lines, I suppose... work around... cd /etc/bash_completion.d ln -s ../../usr/share/bash-completion/mount.linux mount.linux
'mount' and 'mount.linux' are two different files (and, respectively, two different entries in `eselect bashcomp list`): $ ▶ ll /usr/share/bash-completion/mount* -rw-r--r-- 1 2.0K Jun 4 14:18 /usr/share/bash-completion/mount -rw-r--r-- 1 11K Jun 4 14:18 /usr/share/bash-completion/mount.linux $ ▶ eselect bashcomp list [...] [268] mount [269] mount.linux The issue here is that you have 'mount' enabled but not mount.linux - this causes the issue you're seeing. To fix this, enable mount.linux as well - it is necesary for 'mount' on linux systems as you have already figured. (In reply to Emanuel Dávila from comment #0) > so the file /etc/bash_completion.d/mount needs some fix in the first lines, No actually. IMO this bug is invalid but let's see if the shell-tools@ team has a suggestion of making this more obvious (having to enable 'mount.linux' as well if enabling 'mount' on linux systems).
Both enabled... => eselect bashcomp list | grep mount [125] fusermount [271] mount * [272] mount.linux * [273] mountpoint [428] umount [429] umount.linux still shows the error... I have this file... /etc/bash_completion.d/mount -> ../../usr/share/bash-completion/mount when loaded /etc/bash_completion.d/mount if the plataform is linux it looks for... /etc/bash_completion.d/mount.linux but isn't there... I think mount.linux it's supposed to be automatically loaded if the plataform is linux, in the mount file... if [[ $OSTYPE == *linux* ]]; then . "$BASH_SOURCE.linux" return fi but this doesn't get pointed to /usr/share/bash-completion/mount.linux but to /etc/bash_completion.d/mount.linux
(In reply to Emanuel Dávila from comment #2) > Both enabled... > > => eselect bashcomp list | grep mount > [125] fusermount > [271] mount * > [272] mount.linux * > > I have this file... > > /etc/bash_completion.d/mount -> ../../usr/share/bash-completion/mount When you enable 'mount.linux' through `eselect bashcomp` it creates the symlink /etc/bash_completion.d/mount.linux -> ../../usr/share/bash-completion/mount.linux If you didn't have that symlink *after* enabling 'mount.linux' that is a separate issue. > I think mount.linux it's supposed to be automatically loaded if the > plataform is linux, in the mount file... I'm not sure if bashcomp works that way and can do things like this. > but this doesn't get pointed to /usr/share/bash-completion/mount.linux but > to /etc/bash_completion.d/mount.linux Yes, that is the expected bahaviour. Probably the output from: . "$BASH_SOURCE.linux" should be sent to /dev/null to avoid unnecesary error messages if 'mount.linux' does not exist, but that is a decision for shell-tools@ to make.
No problems when completions installed in default location and loaded dynamically. So I think this bug should depend on bug 472938 .
(In reply to Alexander Tsoy from comment #4) > No problems when completions installed in default location and loaded > dynamically. So I think this bug should depend on bug 472938 . Following and closing this bug accordingly If the problem is still there with 2.1-r1, reopen the bug