[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
Thu Dec 15 16:38:13 UTC 2011
Bugs item #313166, was changed at 2011-06-10 13:20 by Igor Murzov
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313166&group_id=100114
>Status: Pending
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: Fix Committed
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.
----------------------------------------------------------------------
>Comment By: Igor Murzov (garik-guest)
Date: 2011-12-15 20:38
Message:
New linux-only mount completion is now available in the master branch.
----------------------------------------------------------------------
Comment By: Igor Murzov (garik-guest)
Date: 2011-11-26 18:33
Message:
New mount completion for linux available in the "mount" branch:
http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=shortlog;h=refs/heads/mount
Please test.
----------------------------------------------------------------------
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