From 41082930f33fa43391986ac05394dbfff3b5dfd7 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Sun, 19 Apr 2020 00:03:37 +0530 Subject: [PATCH] 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 --- src/bash_completion/ceph | 2 +- src/ceph.in | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bash_completion/ceph b/src/bash_completion/ceph index beec700e854..d28c8a4fa76 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