The following commit has been merged in the mount branch:
commit 7a1a3da08a77de2952b75dc514fa962d874c5c95
Author: Igor Murzov <[email protected]>
Date:   Sun Dec 4 02:39:32 2011 +0400

    umount: Half-fix for completion of relative paths.

diff --git a/completions/umount.linux b/completions/umount.linux
index 13a923c..3fbd544 100644
--- a/completions/umount.linux
+++ b/completions/umount.linux
@@ -65,6 +65,18 @@ _linux_fstab()
         fi
     done
 
+    # Add some relative paths to COMPREPLY
+    if [[ $cur && $cur != /* ]]; then
+        local i n=${#COMPREPLY[@]}
+        for (( i=0; i < $n; i++ )); do
+            if [[ "${COMPREPLY[i]}" == "$PWD"* ]]; then
+                [[ $cur == ./* ]] &&
+                    COMPREPLY+=( "./${COMPREPLY[i]##$PWD*(/)}" ) ||
+                    COMPREPLY+=( "${COMPREPLY[i]##$PWD*(/)}" )
+            fi
+        done
+    fi
+
     _reply_compgen_array
 }
 

-- 
bash-completion

_______________________________________________
Bash-completion-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-commits

Reply via email to