I know it. A simple typo. Cost me hours trying to figure out what was wrong :( Just a lazy eye.
On Sun, Apr 12, 2026 at 10:47 PM dana <dana@xxxxxxx> wrote:i don't see the difference
The first one tries to put expansion flags in {} instead of (). That's nothing to do with spaces, Ray. It's always ${(flags)...} - curlies on the outside, parens on the inside.
What an improvement! That $' ' quoting ... still don't understand it or use it. This is all mods to grep colorizations, which are so overloaded with superfluous codes -- but I'm told that grep is extra careful due to the fact that some terminals might need them. Still, I'd take native zsh code if it would work -- no pipes, no '<<<', no '$()'. All this sed stuff -- good example of 'write only' code -- I know what it means when I write it, but an hour later it's gibberish..As for this:
sed -r 's/(\x1b\[K[:-]\x1b\[m\x1b\[K)[[:space:]]*/\1 /g'
Even if you stick with sed you might prefer an ANSI string version of the command:
$'s/(\e\\[K[:-]\e\\[m\e\\[K)[ \t]*/\\1 /g'