Pressing ^W will remove the prompt line by default when we ask for user input because of readline.
$ echo -n "this is a prompt using readline: "; read -e -r stuff
^D
Instead we might be able to just use the -p option of read to avoid this and still get the readline features such as tab completion.
$ read -p "$(tput setaf 7)this a prompt using readline: $(tput sgr0) " -e -r stuff
this a prompt using readline: read -p "$(tput setaf 7)this a prompt using readline: $(tput sgr0) " -e -r st
stats/ stickies.txt
Pressing ^W will remove the prompt line by default when we ask for user input because of readline.
Instead we might be able to just use the
-p
option of read to avoid this and still get the readline features such as tab completion.