I have this script:
#!/usr/bin/env bash
main() {
while true; do
read -r -ep "> " input
history -s "$input"
echo "$input"
done
}
main
which works well for single line strings.
Now I'm looking to allow the user to enter multiline strings, e.g. something like the following:
> foo \
> bar
foobar
how do I modify my read command to allow this functionality?