Re: playing with IFS
Ray Andrews <[email protected]> Mon, 13 Apr 2026 06:46:43 -0700
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
On 2026-04-12 19:46, dana wrote:
> On Sun 12 Apr 2026, at 20:37, Ray Andrews wrote:
>> [ "$nospaces" ] && _execute_output=( ${(f)"$( sed -r
>> 's/(\x1b\[K[:-]\x1b\[m\x1b\[K)[[:space:]]*/\1 /g' <<<
>> ${(F)_execute_output} )"} )
>>
>> Yup, it throws an error alright. This is rather better:
>>
>> [ "$nospaces" ] && _execute_output=( ${(f)"$( sed -r
>> 's/(\x1b\[K[:-]\x1b\[m\x1b\[K)[[:space:]]*/\1 /g' <<<
>> ${(F)_execute_output} )"} )
> i don't see the difference
Interesting ... that's not what I posted, yet that looks like a
quotation. I posted this:
BTW, here's the actual thing:
[ "$nospaces" ] && _execute_output=( ${{f}"$( sed -r
's/(\x1b\[K[:-]\x1b\[m\x1b\[K)[[:space:]]*/\1 /g' <<<
${(F)_execute_output} )"} )
Yup, it throws an error alright. This is rather better:
[ "$nospaces" ] && _execute_output=( ${(f)"$( sed -r
's/(\x1b\[K[:-]\x1b\[m\x1b\[K)[[:space:]]*/\1 /g' <<<
${(F)_execute_output} )"} )
> untested but something like
>
> () {
> local -a match mbegin mend
> _execute_output=( ${_execute_output//(#b)($'\e[K'[:-]$'\e[m\e[K')[[:space:]]#/${match[1]} } )
> }
Will try, tx.
> dana
>