[ovs-dev] [RFC ovs-appctl compgen] ovs-appctl: Add bash command-line completion script.

Ben Pfaff blp at nicira.com
Mon Sep 15 15:56:24 UTC 2014


On Fri, Sep 12, 2014 at 12:14:51AM -0700, Alex Wang wrote:
> This patch is a RFC for the bash command-line completion script
> for ovs-appctl command.  Right now, the script can do the following:
> 
> - accept user specified '--target' and query available completions
>   from the corresponding deamons.
> 
> - once the subcommand (e.g. ofproto/trace) has been given, the
>   script will print the subcommand format.
> 
> - the script can convert between keywords like 'bridge/port/interface/dp'
>   and the available record in ovsdb.
> 
> - the script can print and auto-complete the half input argument.
> 
> To use the script, either copy it inside /etc/bash_completion.d/
> or manually run it via . ovs-appctl-compgen.bash.
> 
> Also, a unit testsuite is provided as ovs-appctl-compgen-test.bash.
> It is suggested that this testsuit be run inside ovs-sandbox.
> 
> Signed-off-by: Alex Wang <alexw at nicira.com>

Do we know anyone who knows bash well?  I don't really feel confident
about reviewing this myself.



More information about the dev mailing list