[Bash-completion-devel] [bash-completion-Bugs][312285] nfs mount completion broken

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Fri Jan 22 19:03:48 UTC 2010


Bugs item #312285, was opened at 2010-01-22 21:03 by Leonard Crestez
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312285&group_id=100114

Status: Open
Priority: 3
Submitted By: Leonard Crestez (cdleonard-guest)
Assigned to: Nobody (None)
Summary: nfs mount completion broken 
Distribution: None
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
Original report by "Ildar Mulyukov <ildar at users.sourceforge.net>" to the bash-completion-devel list.

"""
hi! I checked current GIT. This completes wrong:
        $ mount nfsserver:/<TAB>
        bin/        etc/        lost+found/ opt/        sbin/       tmp/
        boot/       home/       media/      proc/       srv/        usr/
        dev/        lib/        mnt/        root/       sys/        var/

I couldn't debug it myself, sorry :-(
Best regards,
"""

It's very likely that this is because COMP_WORDBREAKS now contains a colon. I don't use NFS; could somebody else test the following tiny patch?

diff --git a/contrib/mount b/contrib/mount
index 0474df0..99e77b4 100644
--- a/contrib/mount
+++ b/contrib/mount
@@ -12,9 +12,9 @@ _mount()
     local cur i sm host prev
 
     COMPREPLY=()
-    cur=`_get_cword`
+    cur=`_get_cword ':'`
+    prev=`_get_pword ':'`
     [[ "$cur" == \\ ]] && cur="/"
-    prev=${COMP_WORDS[COMP_CWORD-1]}
 
     for i in {,/usr}/{,s}bin/showmount; do [ -x $i ] && sm=$i && break; done
 


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312285&group_id=100114



More information about the Bash-completion-devel mailing list