[Bash-completion-commits] [SCM] bash-completion branch, master, updated. fcc305a11bfa14463f22ba58d011f31f7acc17c5
Ville Skyttä
ville.skytta at iki.fi
Mon Dec 28 21:01:38 UTC 2009
The following commit has been merged in the master branch:
commit fcc305a11bfa14463f22ba58d011f31f7acc17c5
Author: Ville Skyttä <ville.skytta at iki.fi>
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
More information about the Bash-completion-commits
mailing list