From: Quentin Monnet Date: Thu, 8 Feb 2018 04:27:16 +0000 (-0800) Subject: tools: bpftool: add bash completion for `bpftool prog load` X-Git-Tag: v4.19~1593^2~8^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55f3538c4923e9dfca132e99ebec370e8094afda;p=platform%2Fkernel%2Flinux-rpi3.git tools: bpftool: add bash completion for `bpftool prog load` Add bash completion for bpftool command `prog load`. Completion for this command is easy, as it only takes existing file paths as arguments. Fixes: 49a086c201a9 ("bpftool: implement prog load command") Signed-off-by: Quentin Monnet Reviewed-by: Jakub Kicinski Signed-off-by: Daniel Borkmann --- diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool index 0137866..17d2464 100644 --- a/tools/bpf/bpftool/bash-completion/bpftool +++ b/tools/bpf/bpftool/bash-completion/bpftool @@ -230,10 +230,14 @@ _bpftool() fi return 0 ;; + load) + _filedir + return 0 + ;; *) [[ $prev == $object ]] && \ - COMPREPLY=( $( compgen -W 'dump help pin show list' -- \ - "$cur" ) ) + COMPREPLY=( $( compgen -W 'dump help pin load \ + show list' -- "$cur" ) ) ;; esac ;;