Commit 90eea408 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov
Browse files

bpftool: update bash-completion w/ new c option for btf dump



Add bash completion for new C btf dump option.

Cc: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 220ba451
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -638,11 +638,24 @@ _bpftool()
                            esac
                            return 0
                            ;;
                        format)
                            COMPREPLY=( $( compgen -W "c raw" -- "$cur" ) )
                            ;;
                        *)
                            if [[ $cword == 6 ]] && [[ ${words[3]} == "map" ]]; then
                                 COMPREPLY+=( $( compgen -W 'key value kv all' -- \
                                     "$cur" ) )
                            # emit extra options
                            case ${words[3]} in
                                id|file)
                                    _bpftool_once_attr 'format'
                                    ;;
                                map|prog)
                                    if [[ ${words[3]} == "map" ]] && [[ $cword == 6 ]]; then
                                        COMPREPLY+=( $( compgen -W "key value kv all" -- "$cur" ) )
                                    fi
                                    _bpftool_once_attr 'format'
                                    ;;
                                *)
                                    ;;
                            esac
                            return 0
                            ;;
                    esac