Some openbsd experiements:

# pkg_add foo                                                                                           
Can't find foo
# echo $?
0
# 
# pkg_info foo
# echo $?
0

# pkg_add -s vim 
Ambiguous: vim could be vim-7.2.444-gtk2 vim-7.2.444-no_x11
# pkg_add -s vim--no_x11
# echo $?
0
# pkg_add -s vimfooooooooo
Can't find vimfooooooooo
# pkg_add -s vim--foooooooo
Can't find vim--foooooooo
# echo $?
0