# HG changeset patch # User Franz Glasner # Date 1725202510 -7200 # Node ID 7c2ffcc92df67660ff8896c60567baf5c8f89ad1 # Parent 5da57fa5009fd50070ec0bb322780a63287a282e array.sh: array_print_length() now always returns 0 diff -r 5da57fa5009f -r 7c2ffcc92df6 share/local-bsdtools/array.sh --- a/share/local-bsdtools/array.sh Sun Sep 01 13:58:01 2024 +0200 +++ b/share/local-bsdtools/array.sh Sun Sep 01 16:55:10 2024 +0200 @@ -179,6 +179,9 @@ #: The number of elements of the array. #: If the array does not exist the output is -1. #: +#: Returns: +#: 0 (truthy) +#: array_print_length() { local __farr_name @@ -189,11 +192,10 @@ if array_length __farr_vn ${__farr_name}; then printf "%s" "${__farr_vn}" - return 0 else printf "%s" "-1" - return 1 fi + return 0 }