tools: bpftool: add bash completion for `bpftool prog load`

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/55f3538c4923e9dfca132e99ebec370e8094afda
Commit:     55f3538c4923e9dfca132e99ebec370e8094afda
Parent:     2148481d5d3111e5e9aa5adc1905fa3539e548c8
Refname:    refs/heads/master
Author:     Quentin Monnet <[email protected]>
AuthorDate: Wed Feb 7 20:27:16 2018 -0800
Committer:  Daniel Borkmann <[email protected]>
CommitDate: Thu Feb 8 11:59:50 2018 +0100

    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 <[email protected]>
    Reviewed-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
---
 tools/bpf/bpftool/bash-completion/bpftool | 8 ++++++--
 1 file 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
             ;;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.