bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Read Prompt Width Miscalculation (Non-Printing Characters)


From: The Administrator
Subject: Read Prompt Width Miscalculation (Non-Printing Characters)
Date: Wed, 28 Dec 2022 13:09:02 -0600

Hello and happy holiday hacking. Does the read builtin stand to benefit from \[ and \] denotation ala $PS1 and friends? Here is a quick example:

read -erp "$( tput setaf 2 )NEW:$( tput sgr0 ) "

Fill the line with “0123456789ABCDEFGH” and try deleting some of it. I have attached a small demonstration.

Thank you.

Attachment: Bash: Read Prompt's Width Miscalculated.gif
Description: GIF image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]