[Bash-completion-devel] [bash-completion-Bugs][313166] mount completion options do not allow _filedir as the source
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Fri Jun 10 09:20:14 UTC 2011
Bugs item #313166, was opened at 2011-06-10 04:20 by Trey Blancher
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313166&group_id=100114
Status: Open
Priority: 3
Submitted By: Trey Blancher (ectospasm-guest)
Assigned to: Nobody (None)
Summary: mount completion options do not allow _filedir as the source
Distribution: Debian
Originally reported in: None
Milestone: 1.3
Status: None
Original bug number:
Initial Comment:
I'm trying to use the mount command with the -o loop option, which can accept a regular file (such as an ISO or other disk image) as its source. However, tab completion does not work as expected, since it essentially only allows devices in fstab, or NFS/CIFS shares. I've fixed it well enough for me, here's the output of "diff -u mount.orig mount"
--- mount.orig 2011-06-10 03:58:58.599619176 -0500
+++ mount 2011-06-10 03:32:18.834848464 -0500
@@ -122,6 +122,8 @@
_linux_fstab -L < /etc/fstab
elif [ "$prev" = -U ]; then
COMPREPLY=( $( compgen -W '$(sed -ne "s/^[[:space:]]*UUID=\([^[:space:]]*\).*/\1/p" /etc/fstab )' -- "$cur" ) )
+ elif [ $(echo "$prev" | egrep "*loop*") ]; then
+ _filedir
else
_linux_fstab < /etc/fstab
fi
I have no idea if that's the appropriate way to search the options list for "loop", but that works for me. There's probably a better way to do it. The file attached is my edited file.
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313166&group_id=100114
More information about the Bash-completion-devel
mailing list