From: Kotresh HR Date: Sat, 18 Apr 2020 18:33:37 +0000 (+0530) Subject: bash_completion: Do not auto complete obsolete and hidden cmds X-Git-Tag: v16.1.0~2459^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=41082930f33fa43391986ac05394dbfff3b5dfd7;p=ceph.git bash_completion: Do not auto complete obsolete and hidden cmds This patch fixes two things. 1. Do not auto complete obsolete and hidden cmds. 2. sub command completions often failed due to the use of associative arrays which does not keep the order. Hence used non-associative arrays. Fixes: https://tracker.ceph.com/issues/45141 Signed-off-by: Kotresh HR --- diff --git a/src/bash_completion/ceph b/src/bash_completion/ceph index beec700e854c..d28c8a4fa76e 100644 --- a/src/bash_completion/ceph +++ b/src/bash_completion/ceph @@ -27,7 +27,7 @@ _ceph() COMPREPLY=( $(compgen -W "${options_noarg} ${options_arg}" -- $cur) ) return 0 fi - declare -A hint_args + declare -a hint_args for (( i=1 ; i