summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2018-02-08 07:27:16 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-02-08 13:59:50 +0300
commit55f3538c4923e9dfca132e99ebec370e8094afda (patch)
treea84a488f08b1044ab3f0cad5c05d4cdd40205759 /tools
parent2148481d5d3111e5e9aa5adc1905fa3539e548c8 (diff)
downloadlinux-55f3538c4923e9dfca132e99ebec370e8094afda.tar.xz
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 <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/bpf/bpftool/bash-completion/bpftool8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool
index 0137866bb8f6..17d246418348 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
;;