mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 16:53:54 +08:00
tools: bpftool: add bash completion for bpftool probes
Add the bash completion related to the newly introduced "bpftool feature probe" command. Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
f9499fedf2
commit
948703e808
@ -679,6 +679,25 @@ _bpftool()
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
feature)
|
||||
case $command in
|
||||
probe)
|
||||
[[ $prev == "dev" ]] && _sysfs_get_netdevs && return 0
|
||||
[[ $prev == "prefix" ]] && return 0
|
||||
if _bpftool_search_list 'macros'; then
|
||||
COMPREPLY+=( $( compgen -W 'prefix' -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY+=( $( compgen -W 'macros' -- "$cur" ) )
|
||||
fi
|
||||
_bpftool_one_of_list 'kernel dev'
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
[[ $prev == $object ]] && \
|
||||
COMPREPLY=( $( compgen -W 'help probe' -- "$cur" ) )
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
} &&
|
||||
complete -F _bpftool bpftool
|
||||
|
Loading…
Reference in New Issue
Block a user