Skip to content

Commit 9a1d7b3

Browse files
Tao Chenqmonnet
authored andcommitted
bpftool: Add bash completion for token argument
This commit updates the bash completion script with the new token argument. $ bpftool token help list show Reviewed-by: Quentin Monnet <qmo@kernel.org> Signed-off-by: Tao Chen <chen.dylane@linux.dev> Link: https://lore.kernel.org/r/20250723144442.1427943-3-chen.dylane@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
1 parent 00ade8b commit 9a1d7b3

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

bash-completion/bpftool

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,17 @@ _bpftool()
12151215
;;
12161216
esac
12171217
;;
1218+
token)
1219+
case $command in
1220+
show|list)
1221+
return 0
1222+
;;
1223+
*)
1224+
[[ $prev == $object ]] && \
1225+
COMPREPLY=( $( compgen -W 'help show list' -- "$cur" ) )
1226+
;;
1227+
esac
1228+
;;
12181229
esac
12191230
} &&
12201231
complete -F _bpftool bpftool

0 commit comments

Comments
 (0)