In attempting to patch bashcomp.eselect for Gentoo Prefix support, I came across a bug in the way bashcomp.eselect handles the array ES_BASHCOMP_DIRS. Attached is a patch to fix. Basically, the for loop that processes ES_BASHCOMP_DIRS only ever accesses the first index, rather than looping through all of them. Reproducible: Always Steps to Reproduce:
Created attachment 195243 [details, diff] bashcomp.eselect patch: [@] addition
I think that it was never intended that ES_BASHCOMP_DIRS is an array. It is rather a space-separated list of directories.
I'm fine with whatever you pick, since the functionality will remain the same in the end, but a space-separated list of directories is much more prone to breaking than an array.
It has been a space-separated array since its introduction three years ago. Changing it now would break the systems of people who expect its current (although undocumented) functionality.