Reputation: 161
I'm trying to allow arrow keys in bash user input readarray
. I know that you can allow them in read
using -e
but do you have any ideas for readarray
?
Thank you for your help.
Upvotes: 0
Views: 67
Reputation: 531125
readarray
isn't intended for interactive use, so it does not support using the Readline library for editing its input. Instead, you just need to use read
in a loop.
declare -a arr
while read -re; do
arr+=( "$REPLY" )
done
Upvotes: 2