OSDN Git Service

bpftool: Update bash completion for "bpftool feature" command
authorMichal Rostecki <mrostecki@opensuse.org>
Wed, 26 Feb 2020 16:59:38 +0000 (17:59 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 26 Feb 2020 17:34:34 +0000 (18:34 +0100)
Update bash completion for "bpftool feature" command with the new
argument: "full".

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20200226165941.6379-5-mrostecki@opensuse.org
tools/bpf/bpftool/bash-completion/bpftool

index ad4133b..f2838a6 100644 (file)
@@ -984,11 +984,12 @@ _bpftool()
                 probe)
                     [[ $prev == "prefix" ]] && return 0
                     if _bpftool_search_list 'macros'; then
-                        COMPREPLY+=( $( compgen -W 'prefix' -- "$cur" ) )
+                        _bpftool_once_attr 'prefix'
                     else
                         COMPREPLY+=( $( compgen -W 'macros' -- "$cur" ) )
                     fi
                     _bpftool_one_of_list 'kernel dev'
+                    _bpftool_once_attr 'full'
                     return 0
                     ;;
                 *)