On 12/28/22 2:09 PM, The Administrator wrote:
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 ) "
You can either use $'\001' and $'\002' in place of \[ and \], which is
what they end up expanding to for readline, or you can write your prompt
string as you would write PS1 and use the ${word@P} expansion when you
pass it as an argument to `read' (preferred).
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/