From 4db5dcac03af9b4035281fc09f46c44b6fdeadbc Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Mon, 7 Jan 2019 17:52:19 +0100 Subject: [PATCH] Subcommand list are now dynamic in bash completion --- bash_completion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index 3f2c6f8..17d0192 100644 --- a/bash_completion +++ b/bash_completion @@ -9,7 +9,7 @@ function _bkctld() cur=${COMP_WORDS[COMP_CWORD]}; prev=${COMP_WORDS[COMP_CWORD-1]}; - commands="init update remove start stop reload restart sync status key port ip inc rm check stats" + commands=$(find /usr/lib/bkctld/ -name "bkctld-*" -exec basename {} \;|sed 's/^bkctld-//') if [ $COMP_CWORD -eq 1 ]; then COMPREPLY=($(compgen -W '${commands}' -- ${cur}))