ovs_appctl_compgen: Further refine the parse_and_compgen function.

Signed-off-by: Yeqiao Wang <ee07b291@gmail.com>