On 4/26/19 10:09 AM, Stephane Chazelas wrote:
> One can use:
>
> IFS= read -i "$var" -red $'\r' var
>
> In bash as the equivalent of zsh's
>
> vared var
>
>
> To edit the content of a variable (with the added restriction
> that $var can't contain CR or NUL characters), using ^V^J to
> embed newline characters.
>
> But I find that after I run that command and return to the
> prompt, pressing Enter inserts ^M instead of accepting the
> current line. It seems it only happens with -d $'\r'
Thanks for the report.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/