[ovs-git] [openvswitch/ovs] bb5dbe: ovs-vsctl-bashcomp: Avoid setting the COMP_WORDBRE...

GitHub noreply at github.com
Fri Mar 20 23:43:48 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: bb5dbe78592b3f39f0e7e6361c8796a5023363e5
      https://github.com/openvswitch/ovs/commit/bb5dbe78592b3f39f0e7e6361c8796a5023363e5
  Author: Alex Wang <alexw at nicira.com>
  Date:   2015-03-20 (Fri, 20 Mar 2015)

  Changed paths:
    M tests/completion.at
    M utilities/ovs-vsctl-bashcomp.bash

  Log Message:
  -----------
  ovs-vsctl-bashcomp: Avoid setting the COMP_WORDBREAKS.

Modifying $COMP_WORDBREAKS in completion script is not the recommended
as it is a global variable and the modification could affect the behavior
of other completion scripts.  As a workaround, this commit uses the
_get_comp_words_by_ref which allows user to exclude characters out of
$COMP_WORDBREAKS and reassemble input command line.  However, as a side
effect, the bash completion module cannot handle characters defined in
$COMP_WORDBREAKS (e.g. ':' and '=') correctly in the resulting completions.
Thusly, we need to trim the colon-word and equal-word prefixes from reply.

Signed-off-by: Alex Wang <alexw at nicira.com>


  Commit: 2c9907cde3be90e12efb3c2729c0a8e98e898a2d
      https://github.com/openvswitch/ovs/commit/2c9907cde3be90e12efb3c2729c0a8e98e898a2d
  Author: Alex Wang <alexw at nicira.com>
  Date:   2015-03-20 (Fri, 20 Mar 2015)

  Changed paths:
    M Makefile.am
    M debian/openvswitch-common.install
    M debian/openvswitch-switch.install
    M rhel/openvswitch.spec.in
    M utilities/automake.mk
    M utilities/ovs-command-bashcomp.INSTALL.md
    M xenserver/openvswitch-xen.spec.in

  Log Message:
  -----------
  bashcomp: Install and package completion scripts.

This commit makes the bash completion scripts be installed to
$(sysconfdir)/bash_completion.d/ through 'make install' and to
/etc/bash_completion.d/ through package installation.  This will
make the scripts available for each bash session.

An alternative is to put scripts to /usr/share/bash_completion/
directory.  However, this is not supported by earlier version of
bash completion.

Signed-off-by: Alex Wang <alexw at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/777cb78767fd...2c9907cde3be


More information about the git mailing list