bug-bash
[Top][All Lists]
Advanced

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

Re: C-style escapes within substitution expansion


From: Chet Ramey
Subject: Re: C-style escapes within substitution expansion
Date: Fri, 07 Mar 2014 21:08:35 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 3/7/14, 2:42 PM, David Sines wrote:

> Bash Version: 4.3
> Patch Level: 0
> Release Status: release
> 
> Description:
>         When invoked as sh, bash 4.3.0 doesn't interpret C-style escapes
> within double-quoted substitution expansions ("${var/$'what'/ever}").

I think this is a bug; this is the wrong place for posix-mode treatment of
single quotes inside double-quoted word expansions.  Here's a patch that
makes posix mode behave like the default in this case.

Chet
-- 
``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/

Attachment: parse-ansi-expand.patch
Description: Text Data


reply via email to

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