laktak / extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
MIT License
878 stars 45 forks source link

Unable to use filters with bash 4.2 #99

Closed cwalkatron closed 1 year ago

cwalkatron commented 2 years ago

I'm stuck on a system with bash 4.2 and readarray doesn't have the -d flag in that version.

% bash -c 'cd ~/.tmux/plugins/extrakto/scripts/; . helpers.sh; modes_list_init'
helpers.sh: line 169: readarray: -d: invalid option
readarray: usage: readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
helpers.sh: line 170: [-1]: bad array subscript

I love extrakto and would use the filters if I could. Any chance of making this work in bash 4.2?

Thanks!

laktak commented 2 years ago

Haven't had a chance to look this up till now but you can try to use revision c7d3b9c (as 9d001b9 added the readarray).

I don't plan to support bash 4.2 but I think the old version should. Let me know if this works for you then I'll add a tag.

longforrich commented 1 year ago

c7d3b9cfb0967dc82dea5b5663de48328d3d50ec can work on CentOS7.9 with bash 4.2.46

laktak commented 1 year ago

@longforrich thanks for testing! I've created a branch for bash4.