OSDN Git Service

bpftool: add bash completion for peek/push/enqueue/pop/dequeue
authorStanislav Fomichev <sdf@google.com>
Wed, 16 Jan 2019 19:10:05 +0000 (11:10 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Jan 2019 09:30:32 +0000 (10:30 +0100)
commit55c70bffc772897f00336b36ff74a4007f7a346d
treef8c692d5971fcf34e5f0314b86fa03509c7aacbd
parent74f312ef847f006aadbe5061eeefe375200e3207
bpftool: add bash completion for peek/push/enqueue/pop/dequeue

bpftool map peek id <TAB>      - suggests only queue and stack map ids
bpftool map pop id <TAB>       - suggests only stack map ids
bpftool map dequeue id <TAB>   - suggests only queue map ids

bpftool map push id <TAB>      - suggests only stack map ids
bpftool map enqueue id <TAB>   - suggests only queue map ids

bpftool map push id 1 <TAB>    - suggests 'value', not 'key'
bpftool map enqueue id 2 <TAB> - suggests 'value', not 'key'

bpftool map update id <stack/queue type> - suggests 'value', not 'key'
bpftool map lookup id <stack/queue type> - suggests nothing

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/bash-completion/bpftool