bug-bash
[Top][All Lists]
Advanced

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

Re: Bash "bug" - in "read -e -r var"


From: Chet Ramey
Subject: Re: Bash "bug" - in "read -e -r var"
Date: Mon, 15 Dec 2014 21:40:41 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 12/15/14 11:13 AM, Dan Douglas wrote:

> Ah ok I thought -e basically negated the effect of -r for some reason but I
> guess not (like you can still use \ to escape line continuations without -r it
> seems). 

They're separate but kind of clumsy to use together for line continuations.
`read' ends up calling readline N times for every N-1 backslash-escaped
newlines.  If -r is supplied it doesn't need to do anything out of the
ordinary for \<newline>.

In terms of backslash escaping characters in the line read, backslash
isn't really special to readline, it's just mapped to self-insert.  You
still have to use quoted-insert to insert characters that are bound to
line editing commands.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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