[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 2.0-42-g8e63eaf

Ville Skyttä ville.skytta at iki.fi
Sun Sep 23 18:02:37 UTC 2012


The following commit has been merged in the master branch:
commit 8e63eafb83342dec5a04fe3c49330c6cbe00f96d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sun Sep 23 21:00:53 2012 +0300

    lvm volumes: Complete on /dev/mapper/* (RedHat: #851787).
    
    This is done only if user has typed it though.

diff --git a/completions/lvm b/completions/lvm
index b657e0b..8548753 100644
--- a/completions/lvm
+++ b/completions/lvm
@@ -16,6 +16,13 @@ _logicalvolumes()
 {
     COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \
         sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- "$cur" ) )
+    if [[ $cur == /dev/mapper/* ]]; then
+        _filedir
+        local i
+        for i in ${!COMPREPLY[@]}; do
+            [[ ${COMPREPLY[i]} == */control ]] && unset COMPREPLY[i]
+        done
+    fi
 }
 
 _units()

-- 
bash-completion



More information about the Bash-completion-commits mailing list