Skip to content

Commit 55f3538

Browse files
qmonnetborkmann
authored andcommitted
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: 49a086c ("bpftool: implement prog load command") Signed-off-by: Quentin Monnet <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 2148481 commit 55f3538

File tree

1 file changed

+6
-2
lines changed
  • tools/bpf/bpftool/bash-completion

1 file changed

+6
-2
lines changed

tools/bpf/bpftool/bash-completion/bpftool

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,14 @@ _bpftool()
230230
fi
231231
return 0
232232
;;
233+
load)
234+
_filedir
235+
return 0
236+
;;
233237
*)
234238
[[ $prev == $object ]] && \
235-
COMPREPLY=( $( compgen -W 'dump help pin show list' -- \
236-
"$cur" ) )
239+
COMPREPLY=( $( compgen -W 'dump help pin load \
240+
show list' -- "$cur" ) )
237241
;;
238242
esac
239243
;;

0 commit comments

Comments
 (0)