michael dixit:
>Stephane Chazelas <stephane.chazelas <at> gmail.com> writes:
>> 2014-07-29 22:53:04 +0000, michael:
>> > Stephane Chazelas <stephane.chazelas <at> gmail.com> writes:
>> >
>> > > Note that it's only about the ${var[:][+-]literal} syntax.
>> >
>> > And $(command substitutions)
>>
>> Indeed, that's more serious.

This has been the case since mksh R17, you’re the first one to
notice this. I’ll try to figure it out, but it’s not a priority
issue and the bugs fixed that introduced this issue were *much*
worse. (Sorry about that. Need to be realistic here. I did spend
hours yesternight on this.)

>Here's a different thing, though related. Sorry about this, mirabilos,
>but I just installed mksh yesterday and I'm trying to get acquainted.

No problem, hope you’ll like it ;-)

An aside to the two of you: Googlemail has issues with greylisting.
Mails from you may reach my server with weeks delay or not at all.
Posting through GMane should be fine, though – modulo Unicode issues
which Lars still has not fixed.

>I'll take a page from Stephane's book and show you what surprised me:

Right. A comparison to AT&T ksh93 shows that:

mksh$ typeset -p nq
typeset nq=space
ksh93$ typeset -p nq
nq=$'spacedivdedargument\nhere'

Everything else is the same though. (GNU bash behaves like AT&T ksh93,
and with dash all hopes are off, anyway.)

I’ll look at that as well. You are right in that it should not be.
I will *not* report the bug in dash though ;)

>I discovered it because I was counting spaces in a string by saving the

Ugh…

mksh$ b=${a//[! ]}; echo ${#b}
3

This also works in GNU bash and AT&T ksh93.

>Like I said, sorry if it's a nuisance, but I thought you might want to know,

This is alright. I just really hate some parts of POSIX…
and it doesn’t help that the implementation of some corner
cases is not straightforward, in the existing codebase.

bye,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh

Reply via email to