Skip to content

Instantly share code, notes, and snippets.

@SomajitDey
Created April 14, 2021 07:18
Show Gist options
  • Save SomajitDey/4ed1c23b1be3f8c2f56b06413c335c3c to your computer and use it in GitHub Desktop.
Save SomajitDey/4ed1c23b1be3f8c2f56b06413c335c3c to your computer and use it in GitHub Desktop.
UI to input long logical lines that occupy multiple terminal lines through wrapping
while num=$(read -re -p "type: "|& tee /dev/tty|fold -w "$(tput cols)"|wc -l); do tput cuu $num;tput ed; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment