lincheney / fzf-tab-completion

Tab completion using fzf
GNU General Public License v3.0
623 stars 40 forks source link

bash: improve compatibility to bash v4.2 and before #105

Closed henry-hsieh closed 3 months ago

henry-hsieh commented 3 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:

bash: COMP_WORDS[-1]: bad array subscript