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

Re: completion: highlight matching part



On Aug 3, 10:31am, Bart Schaefer wrote:
}
} There's also an erroneous ":" and extra "}"
} in what you say you ended up with.  I think you need:
} 
} highlights='${PREFIX:+=(#bi)($PREFIX:t)(?)*=00=$color[red]=$color[green];$color[bold]}'
} zstyle -e ':completion:*' list-colors \
}     'reply=( "$highlights" ${(s.:.)LS_COLORS} )'

Now it's my turn to have the quoting wrong.  Need another '"..."' in there.

zstyle -e ':completion:*' list-colors \
    'reply=( "'"$highlights"'" ${(s.:.)LS_COLORS} )'

} However, I suspect you think you want this:
} 
}  ${${(s.:.)LS_COLORS}//#(#b)\*(*)=(*)/'=(#bi)($PREFIX:t)(?)(#B)*('$match[1]')='$match[2]'=$color[red]=$color[green];$color[bold]=$color[cyan];$color[bold]'}

Messed that one up, too, I think.  I miscounted the number of "=" as
compared to the number of subexpressions.  I still think you ought to
leave "(#B)" out of there entirely, but the place for it is really after
$match[1] like this:

 ${${(s.:.)LS_COLORS}//#(#b)\*(*)=(*)/'=(#bi)($PREFIX:t)(?)*('$match[1]')(#B)='$match[2]'=$color[red]=$color[green];$color[bold]=$color[cyan];$color[bold]'}



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