jonschipp / ISLET

Isolated, Scalable, & Lightweight Environment for Training
Other
111 stars 18 forks source link

Use of readline can cause blank lines after editor characters #87

Closed jonschipp closed 8 years ago

jonschipp commented 8 years ago

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
jonschipp commented 8 years ago

Completed in https://github.com/jonschipp/ISLET/commit/64f301d872b5a50c95e60eed1915a9c303b14336