bug-bash
[Top][All Lists]
Advanced

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

Re: read -ed $'\r' messes up Enter key at the prompt


From: Chet Ramey
Subject: Re: read -ed $'\r' messes up Enter key at the prompt
Date: Fri, 26 Apr 2019 11:54:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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