diff --git a/etc/rally.bash_completion b/etc/rally.bash_completion index 8bb8ef0f..565c8040 100644 --- a/etc/rally.bash_completion +++ b/etc/rally.bash_completion @@ -50,8 +50,9 @@ _rally() for OPT in ${!OPTS[*]} ; do - CMDSUB=(${OPT//_/ }) - SUBCOMMANDS[${CMDSUB[0]}]+="${CMDSUB[1]} " + CMD=${OPT%%_*} + CMDSUB=${OPT#*_} + SUBCOMMANDS[${CMD}]+="${CMDSUB} " done COMMANDS="${!SUBCOMMANDS[*]}"