> > Sorry it took so long for me to respond, I've been trying to think a > little about the best way to deal with this. This implementation seems > fine to me, but it would be nice if we didn't have to lose the > completion for arguments after a colon or equals. Alex, can you > elaborate a little bit on why we can't use an approach similar to > __ltrim_colon_completions (with a similar check for '=') to make > arguments containing : and = complete? On first glance, its not obvious > to me why that wouldn't work. >
I actually tried both trim and delete. There is no difference in this example: """ *root@promg-2n-a-dhcp85:~/alex_dev/openvswitch# ovs-vsctl set Interface eth2 external_ids:* *attached-mac iface-id iface-status vm-id * *root@promg-2n-a-dhcp85:~/alex_dev/openvswitch# ovs-vsctl set Interface eth2 external_ids:if* *if* """ Then I sent another patch (which uses 'trim') in-reply-to this thread. After that I spent more time investigating and found a bug in function _ovs_vsctl_complete_key_given_table_column(). So, with the new patch + the additional changes below, we can workaround setting COMP_WORDBREAKS and still have the fancy completions. """ diff --git a/utilities/ovs-vsctl-bashcomp.bash b/utilities/ovs-vsctl-bashcomp.bash index a2b56ad..cec78be 100755 --- a/utilities/ovs-vsctl-bashcomp.bash +++ b/utilities/ovs-vsctl-bashcomp.bash @@ -202,7 +202,7 @@ _ovs_vsctl_complete_key_given_table_column () { keys=$(_ovs_vsctl --no-heading --columns="$3" list \ "$2" \ | tr -d '{\"}' | tr -s ', ' '\n' | cut -d'=' -f1 \ - | xargs printf "$4%s\n" | _ovs_vsctl_check_startswith_string "$1") + | xargs printf "$4%s\n" | _ovs_vsctl_check_startswith_string "$4$1") result="${keys}" printf -- "%s\n" "${result}" } """ So, what do you think? Thanks, Alex Wang, Thanks, > > Peter Amidon > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev