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

This commit is contained in:
Ville Skyttä 2009-06-09 00:46:29 +03:00
parent b69961b257
commit 468ba8f150

View File

@ -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