The following commit has been merged in the master branch:
commit fcc305a11bfa14463f22ba58d011f31f7acc17c5
Author: Ville Skyttä <[email protected]>
Date:   Mon Dec 28 23:00:35 2009 +0200

    Don't complete encrypted passwords from ~/.cvspass as CVS roots, add some 
TODO comments.

diff --git a/contrib/cvs b/contrib/cvs
index a78c2cb..cfe775a 100644
--- a/contrib/cvs
+++ b/contrib/cvs
@@ -45,9 +45,11 @@ _cvs_kflags()
 
 _cvs_roots()
 {
+    # TODO: this works very poorly because of the colons
     if [ -r ~/.cvspass ]; then
         # Ugly escaping because of bash treating ':' specially
-        cvsroots=$( sed -e 's/^[^ ]* //' -e 's/:/\\:/g' ~/.cvspass )
+        # TODO: this ugly escaping doesn't help :P
+        cvsroots=$( awk '{ print $2 }' ~/.cvspass | sed -e 's/:/\\:/g' )
         COMPREPLY=( $( compgen -W '$cvsroots' -- "$cur" ) )
     fi
 }

-- 
bash-completion

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

Reply via email to