From 021591017c5a3939c4d9e69366f22c1babcc0cc9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 22 May 2020 09:03:02 -0400 Subject: [PATCH] Fix osimagetab completion --- confluent_client/confluent_env.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/confluent_client/confluent_env.sh b/confluent_client/confluent_env.sh index 2355918c..989411c3 100644 --- a/confluent_client/confluent_env.sh +++ b/confluent_client/confluent_env.sh @@ -138,6 +138,21 @@ _confluent_nodefirmware_completion() fi } +_confluent_osimage_completion() +{ + _confluent_get_args + if [ $NUMARGS == 2 ]; then + COMPREPLY=($(compgen -W "initialize import" -- ${COMP_WORDS[COMP_CWORD]})) + return + elif [ ${CMPARGS[1]} == 'initialize' ]; then + COMPREPLY=($(compgen -W "-h -u -s -t -i" -- ${COMP_WORDS[COMP_CWORD]})) + elif [ ${CMPARGS[1]} == 'import' ]; then + compopt -o default + COMPREPLY=() + return + fi +} + _confluent_nodedeploy_completion() { _confluent_get_args @@ -281,7 +296,7 @@ complete -F _confluent_nn_completion nodeconsole complete -F _confluent_nr_completion nodeeventlog complete -F _confluent_nodefirmware_completion nodefirmware complete -F _confluent_nodedeploy_completion nodedeploy -complete -F _confluent_osimage osimage +complete -F _confluent_osimage_completion osimage complete -F _confluent_ng_completion nodegroupattrib complete -F _confluent_ng_completion nodegroupremove complete -F _confluent_nr_completion nodehealth