vsh: Rewrite opt->type check in vshReadlineParse()
vsh: Rewrite opt->type check in vshReadlineParse()

The vshReadlineParse() function is called whenever user hits
<TAB><TAB>. If there is no command (or a partially written one),
then a list of possible commands is printed to the user. But, if
there is a command then its --options are generated. But
obviously, we can not generate --options if there already is an
--option that's expecting a value. For instance, consider:

  virsh # start --domain <TAB><TAB>

In this case we want to call completer for --domain option, but
that's a different story.

Anyway, the way that we currently check whether --options list
should be generated is checking the type of the last --option. If
it isn't DATA, STRING, INT, or ARGV (all these expect a value),
then we can generate --option list. Well, writing the condition
this way is needlessly verbose and also prone to errors (see
d9a320bf97 for example).

We know that boolean type does not require a value. This leaves
us with the only type that was not mentioned yet - VSH_OT_ALIAS.
This is a special type for backwards compatibility and it refers
to another --option which can be just any type.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Jonathon Jongsma <c7254805a17bd5c41e24c3a278fcbf3afcdfb0fa@redhat.com>

zippy2/libvirt,olafhering/libvirt,zippy2/libvirt,nertpinx/libvirt,libvirt/libvirt,olafhering/libvirt,zippy2/libvirt,nertpinx/libvirt,jfehlig/libvirt,zippy2/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,olafhering/libvirt,crobinso/libvirt,libvirt/libvirt,nertpinx/libvirt,libvirt/libvirt,jfehlig/libvirt,nertpinx/libvirt,olafhering/libvirt,crobinso/libvirt,jfehlig/libvirt,crobinso/libvirt,nertpinx/libvirt