Skip to content
Snippets Groups Projects
Commit 948703e8 authored by Quentin Monnet's avatar Quentin Monnet Committed by Alexei Starovoitov
Browse files

tools: bpftool: add bash completion for bpftool probes


Add the bash completion related to the newly introduced "bpftool feature
probe" command.

Signed-off-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarStanislav Fomichev <sdf@google.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent f9499fed
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment