Skip to content

Commit

Permalink
ovs-vsctl-bashcomp: Add bash command-line completion for ovs-vsctl.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Amidon authored and yew011 committed Mar 12, 2015
1 parent 94ace6f commit 95e4a97
Show file tree
Hide file tree
Showing 4 changed files with 1,017 additions and 52 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -302,6 +302,7 @@ Pankaj Thakkar thakkar@nicira.com
Pasi Kärkkäinen pasik@iki.fi
Paulo Cravero pcravero@as2594.net
Pawan Shukla shuklap@vmware.com
Peter Amidon peter@picnicpark.org
Peter Balland peter@nicira.com
Peter Phaal peter.phaal@inmon.com
Prabina Pattnaik Prabina.Pattnaik@nechclst.in
Expand Down
1 change: 1 addition & 0 deletions utilities/automake.mk
Expand Up @@ -30,6 +30,7 @@ docs += utilities/ovs-command-bashcomp.INSTALL.md
EXTRA_DIST += \
utilities/ovs-check-dead-ifs.in \
utilities/ovs-appctl-bashcomp.bash \
utilities/ovs-vsctl-bashcomp.bash \
utilities/ovs-command-bashcomp.INSTALL.md \
utilities/ovs-ctl.in \
utilities/ovs-dev.py \
Expand Down

0 comments on commit 95e4a97

Please sign in to comment.