cowsay: Avoid error when completing -f when cowsay is not installed.

This commit is contained in:
Ville Skyttä 2011-11-04 21:17:58 +02:00
parent 1ec0d6d336
commit 717cfed94f

View File

@ -7,7 +7,8 @@ _cowsay()
case $prev in
-f)
COMPREPLY=( $( compgen -W '$( cowsay -l | tail -n +2)' -- "$cur" ) )
COMPREPLY=( $( compgen -W \
'$( cowsay -l 2>/dev/null | tail -n +2 )' -- "$cur" ) )
return 0
;;
esac