We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e923b3b commit 7da801cCopy full SHA for 7da801c
bash_completion
@@ -1019,8 +1019,11 @@ _comp_finalize()
1019
fi
1020
1021
1022
- unset -v '_comp_finalize__depth[-1]'
1023
- unset -v '_comp_finalize__target[-1]'
+ # Note: bash 4.2 does not support negative array indices with `unset`
+ # like `unset -v 'arr[-1]'` even when the array has at least one
1024
+ # element. It is supported in bash 4.3.
1025
+ unset -v '_comp_finalize__depth[${#_comp_finalize__depth[@]}-1]'
1026
+ unset -v '_comp_finalize__target[${#_comp_finalize__target[@]}-1]'
1027
if ((${#_comp_finalize__depth[@]} == 0)); then
1028
eval -- "${_comp_finalize__original_return_trap:-trap - RETURN}"
1029
_comp_finalize__original_return_trap=
0 commit comments