]> Git Repo - linux.git/commitdiff
tools: bpftool: add bash completion for `bpftool prog load`
authorQuentin Monnet <[email protected]>
Thu, 8 Feb 2018 04:27:16 +0000 (20:27 -0800)
committerDaniel Borkmann <[email protected]>
Thu, 8 Feb 2018 10:59:50 +0000 (11:59 +0100)
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 <[email protected]>
Reviewed-by: Jakub Kicinski <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
tools/bpf/bpftool/bash-completion/bpftool

index 0137866bb8f6956417d2ef8ff295befbd51821c2..17d246418348be7d8d4d1a93ba28e541f16b5b6d 100644 (file)
@@ -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
             ;;
This page took 0.056811 seconds and 4 git commands to generate.