Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: playing with IFS



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

On Sun 12 Apr 2026, at 20:37, Ray Andrews wrote:
> BTW Mark, I trust that sed can't be done native. Fantastic if it could
> be tho.

untested but something like

  () {
    local -a match mbegin mend
    _execute_output=( ${_execute_output//(#b)($'\e[K'[:-]$'\e[m\e[K')[[:space:]]#/${match[1]} } )
  }

dana




Messages sorted by: Reverse Date, Date, Thread, Author