Use compgen -W instead of grepping $cur in xm create, mute errors from unreadable /etc/xen.
This commit is contained in:
parent
b69961b257
commit
468ba8f150
@ -187,7 +187,9 @@ _xm()
|
|||||||
create)
|
create)
|
||||||
_filedir
|
_filedir
|
||||||
COMPREPLY=( ${COMPREPLY[@]:-} \
|
COMPREPLY=( ${COMPREPLY[@]:-} \
|
||||||
$( command ls /etc/xen | grep "^$cur" ) )
|
$( compgen -W '$( command ls \
|
||||||
|
/etc/xen 2>/dev/null )' \
|
||||||
|
-- $cur ) )
|
||||||
;;
|
;;
|
||||||
new)
|
new)
|
||||||
case $prev in
|
case $prev in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user