Closed henry-hsieh closed 5 months ago
Bash v4.2 and before didn't support negative subscripts. This commit changes the index selection to array[len(array)-1] to fix the errors before Bash v4.2:
array[len(array)-1]
bash: COMP_WORDS[-1]: bad array subscript
Bash v4.2 and before didn't support negative subscripts. This commit changes the index selection to
array[len(array)-1]
to fix the errors before Bash v4.2: