ovs-vsctl-bashcomp: Add bash command-line completion for ovs-vsctl.
authorPeter Amidon <peter@picnicpark.org>
Wed, 4 Feb 2015 17:52:12 +0000 (09:52 -0800)
committerAlex Wang <alexw@nicira.com>
Thu, 12 Mar 2015 21:17:13 +0000 (14:17 -0700)
commit95e4a97a6f68bcc98525e238f73e7924d8645f1b
tree5cd6e283e2d1e17a67fea0dbe0d31da980ef1d03
parent94ace6ffe4d5f0783b308bfc0c7da0ff65afb9a9
ovs-vsctl-bashcomp: Add bash command-line completion for ovs-vsctl.

This patch adds bash command-line completion script for ovs-vsctl.
Therein, codes are added to ovs-vsctl to allow it to print the
options and command arguments.  The ovs-vsctl-bashcomp.bash will
parse the vsctl command and complete on the user input.

The completion script can do the following::

- display available completions and complete on user input for
  global/local options, sub-commands, and arguments.

- query database and expand keywords like 'table/record/column/key'
  to available completions.

- deal with argument relations like 'one and more', 'zero or one'.

- complete multiple ovs-vsctl commands cascaded via '--'.

To use the script, either copy it inside /etc/bash_completion.d/
or manually run it via . ovs-vsctl-bashcomp.bash.

Signed-off-by: Peter Amidon <peter@picnicpark.org>
Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
AUTHORS
utilities/automake.mk
utilities/ovs-vsctl-bashcomp.bash [new file with mode: 0755]
utilities/ovs-vsctl.c