]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: bash-completion: Prepare action autocomplete to support several actions
authorYotam Gigi <yotamg@mellanox.com>
Tue, 7 Feb 2017 13:50:49 +0000 (15:50 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 7 Feb 2017 19:44:53 +0000 (11:44 -0800)
commitf62b54a106f0c198ba7a066ab4b95f4d3e35a3d5
tree516dfc343437e93d1b71a459ceb57b1aedcc760e
parent26e0996a877453433dd15a01d05a7cab87df7851
tc: bash-completion: Prepare action autocomplete to support several actions

The action autocomplete routine (_tc_action_options) currently does not
support several actions statements in one tc command line as it uses the
_tc_once_attr and _tc_one_from_list.

For example, in that case:

$ tc filter add dev eth0 handle ffff: u32 [...]  \
   action sample group 5 rate 12   \
   action sample <TAB>

the _tc_once_attr function, when invoked with "group rate" will not
suggest those as they already exist on the command line.

Fix the function to use the _from variant, thus allowing each action
autocomplete start from the action keyword, and not from the beginning of
the command line.

Signed-off-by: Yotam Gigi <yotamg@mellanox.com>
bash-completion/tc