diff --git a/README.md b/README.md index deb2938..6284724 100644 --- a/README.md +++ b/README.md @@ -641,6 +641,8 @@ fi Enabling `extdebug` allows access to the `BASH_ARGV` array which stores the current function’s arguments in reverse. +**CAVEAT**: Requires `shopt -s compat44` in `bash` 5.0+. + **Example Function:** ```sh diff --git a/test.sh b/test.sh index 597de2b..252e365 100755 --- a/test.sh +++ b/test.sh @@ -69,8 +69,10 @@ test_urldecode() { } test_reverse_array() { + shopt -s compat44 IFS=$'\n' read -d "" -ra result < <(reverse_array 1 2 3 4 5) assert_equals "${result[*]}" "5 4 3 2 1" + shopt -u compat44 } test_remove_array_dups() {