[Bash-completion-commits] [SCM] bash-completion branch, master, updated. fcc305a11bfa14463f22ba58d011f31f7acc17c5

Ville Skyttä ville.skytta at iki.fi
Mon Dec 28 21:01:29 UTC 2009


The following commit has been merged in the master branch:
commit f853e6a6a1981fce4545d4562e528967276592d6
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Mon Dec 28 22:56:13 2009 +0200

    Extract CVS roots completion into _cvs_roots().

diff --git a/contrib/cvs b/contrib/cvs
index 0c694c7..a78c2cb 100644
--- a/contrib/cvs
+++ b/contrib/cvs
@@ -43,6 +43,15 @@ _cvs_kflags()
     COMPREPLY=( $( compgen -W 'kv kvl k o b v' -- "$cur" ) )
 }
 
+_cvs_roots()
+{
+    if [ -r ~/.cvspass ]; then
+        # Ugly escaping because of bash treating ':' specially
+        cvsroots=$( sed -e 's/^[^ ]* //' -e 's/:/\\:/g' ~/.cvspass )
+        COMPREPLY=( $( compgen -W '$cvsroots' -- "$cur" ) )
+    fi
+}
+
 _cvs()
 {
     local cur prev count mode i cvsroot cvsroots pwd
@@ -252,11 +261,7 @@ _cvs()
             fi
             ;;
         cvsroot)
-            if [ -r ~/.cvspass ]; then
-                # Ugly escaping because of bash treating ':' specially
-                cvsroots=$( sed -e 's/^[^ ]* //' -e 's/:/\\:/g' ~/.cvspass )
-                COMPREPLY=( $( compgen -W '$cvsroots' -- "$cur" ) )
-            fi
+            _cvs_roots
             ;;
         export)
             case "$prev" in

-- 
bash-completion



More information about the Bash-completion-commits mailing list