On 21.7. 07:44, Bob Proulx wrote:
Denys Vlasenko wrote:
$ f() { for i; do echo "|$i|"; done; }
$ x=x
$ e=
$ f ${x:+ ""}
^^^ prints nothing, bug?
$ ${x:+"" }
^^^ prints nothing, bug?
Insufficient quoting. That argument should be quoted to avoid the
whitespace getting stripped
On 7/20/18 10:43 AM, Denys Vlasenko wrote:
> $ f() { for i; do echo "|$i|"; done; }
> $ x=x
> $ e=
Thanks for the report. I'll take a look at what needs to be done here.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet
On 7/21/18 12:44 AM, Bob Proulx wrote:
> Denys Vlasenko wrote:
>> $ f() { for i; do echo "|$i|"; done; }
>> $ x=x
>> $ e=
>> $ f ${x:+ ""}
>> ^^^ prints nothing, bug?
>>
>> $ ${x:+"" }
>> ^^^ prints nothing, bug?
>
> Insufficient quoting. That argument should be quoted to avoid t
Chet Ramey wrote:
> Bob Proulx wrote:
> > Denys Vlasenko wrote:
> >> $ f() { for i; do echo "|$i|"; done; }
> >> $ x=x
> >> $ e=
> >> $ f ${x:+ ""}
> >> ^^^ prints nothing, bug?
> >>
> >> $ ${x:+"" }
> >> ^^^ prints nothing, bug?
> >
> > Insufficient quoting. That argument should
Date:Sat, 21 Jul 2018 11:33:18 -0400
From:Chet Ramey
Message-ID: <2fe93203-93fd-2a97-ff54-7cb748294...@case.edu>
| Even if the whitespace gets stripped out, the quoted null string should
| result in an empty argument.
Yes, it certainly should (and unless IFS has
This only works in 4.4; earlier versions throw a 'bad substitution' error. It
causes an infinite loop of calls between 'expand_prompt_string' and
'decode_prompt_string',
where calls to 'xmalloc' exhaust the heap:
$\{_@P};${_@P}
I decided to report this because it is not a user-defined recursive
f
The payload got filtered, so here it is again (substitute the actual
character for [at]):
$\{_[at]P};${_[at]P}
On Sat, Jul 21, 2018, 1:47 PM Chris Schoenberg wrote:
> This only works in 4.4; earlier versions throw a 'bad substitution' error. It
> causes an infinite loop of calls between 'expand_
On 7/21/18 2:47 PM, Chris Schoenberg wrote:
> This only works in 4.4; earlier versions throw a 'bad substitution' error. It
> causes an infinite loop of calls between 'expand_prompt_string' and
> 'decode_prompt_string',
> where calls to 'xmalloc' exhaust the heap:
>
> $\{_@P};${_@P}
>
> I decided
Fair enough. Even though the behavior is different, the end is the same as
udf so makes sense of you want to leave it. Weird how it popped up in 4.4
though.
On Sat, Jul 21, 2018, 6:58 PM Chet Ramey wrote:
> On 7/21/18 2:47 PM, Chris Schoenberg wrote:
> > This only works in 4.4; earlier versions
On 7/21/18 9:16 PM, Chris Schoenberg wrote:
> Fair enough. Even though the behavior is different, the end is the same as
> udf so makes sense of you want to leave it. Weird how it popped up in 4.4
> though.
The ${param@op} expansions were introduced in bash-4.4.
--
``The lyf so short, the craft
Thanks for taking the time to explain that :) I'll do more homework next
time
On Sat, Jul 21, 2018, 8:51 PM Chet Ramey wrote:
> On 7/21/18 9:16 PM, Chris Schoenberg wrote:
> > Fair enough. Even though the behavior is different, the end is the same
> as
> > udf so makes sense of you want to leave
11 matches
Mail list logo