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

Ville Skyttä ville.skytta at iki.fi
Mon Jun 8 21:47:04 UTC 2009


The following commit has been merged in the master branch:
commit 468ba8f1504df6782570a9d69c559fe5648cd558
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Jun 9 00:46:29 2009 +0300

    Use compgen -W instead of grepping $cur in xm create, mute errors from unreadable /etc/xen.

diff --git a/contrib/xm b/contrib/xm
index 6474321..2de5c9a 100644
--- a/contrib/xm
+++ b/contrib/xm
@@ -187,7 +187,9 @@ _xm()
 				create)
 					_filedir
 					COMPREPLY=( ${COMPREPLY[@]:-} \
-						$( command ls /etc/xen | grep "^$cur" ) )
+						$( compgen -W '$( command ls \
+						/etc/xen 2>/dev/null )' \
+						-- $cur ) )
 					;;
 				new)
 					case $prev in

-- 
bash-completion



More information about the Bash-completion-commits mailing list