mirror of
https://github.com/spf13/cobra
synced 2025-05-05 04:47:22 +00:00
fix(bash-v2): activeHelp length check syntax
```shell $ set -u $ foo=() $ echo ${#foo} bash: foo: unbound variable echo ${#foo[*]} 0 ```
This commit is contained in:
parent
162534f92f
commit
53c6d8ab13
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ __%[1]s_process_completion_results() {
|
||||||
__%[1]s_handle_special_char "$cur" =
|
__%[1]s_handle_special_char "$cur" =
|
||||||
|
|
||||||
# Print the activeHelp statements before we finish
|
# Print the activeHelp statements before we finish
|
||||||
if [ ${#activeHelp} -ne 0 ]; then
|
if [ ${#activeHelp[*]} -ne 0 ]; then
|
||||||
printf "\n";
|
printf "\n";
|
||||||
printf "%%s\n" "${activeHelp[@]}"
|
printf "%%s\n" "${activeHelp[@]}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue