1 Using bash command-line completion scripts
2 ------------------------------------------
4 There are two completion scripts available, ovs-appctl-bashcomp.bash
5 and ovs-vsctl-bashcomp.bash respectively.
10 ovs-appctl-bashcomp.bash adds bash command-line completion support
11 for ovs-appctl, ovs-dpctl, ovs-ofctl and ovsdb-tool commands.
16 display available completion or complete on unfinished user input
17 (long option, subcommand, and argument).
19 once the subcommand (e.g. ofproto/trace) has been given, the
20 script will print the subcommand format.
22 the script can convert between keywords like 'bridge/port/interface/dp'
23 and the available record in ovsdb.
28 only support small set of important keywords
29 (dp, datapath, bridge, switch, port, interface, iface).
31 does not support parsing of nested options
32 (e.g. ovsdb-tool create [db [schema]]).
34 does not support expansion on repeatitive argument
35 (e.g. ovs-dpctl show [dp...]).
37 only support matching on long options, and only in the format
38 (--option [arg], i.e. should not use --option=[arg]).
43 ovs-vsctl-bashcomp.bash adds bash command-line completion support
44 for ovs-vsctl command.
49 display available completion and complete on user input for
50 global/local options, command, and argument.
52 query database and expand keywords like 'table/record/column/key'
53 to available completions.
55 deal with argument relations like 'one and more', 'zero or one'.
57 complete multiple ovs-vsctl commands cascaded via '--'.
62 completion of very long ovs-vsctl command can take up to several
68 To use the scripts, either copy them inside /etc/bash_completion.d/ or
69 manually run it directly in bash via . ovs-appctl-bashcomp.bash or
70 . ovs-vsctl-bashcomp.bash.
75 Unit tests are added in tests/completion.at and integrated into autotest
76 framework. To run the tests, just do make check.
81 Please report problems to bugs@openvswitch.org.