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

Re: Funky list-colors

On Thu, Dec 5, 2019 at 12:08 PM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> This seems a less powerful than the hacky printable-LS_COLORS idea,
> which I overall like. From experience, such things often result in
> unpredictable and highly surprising + valuable solutions. Maybe it's
> worth opening this door? In a most optimistic scenario, the code would
> have to do a few isprints…

I don't think it's generally possible to figure out by how much the
cursor will move when you write a given string to TTY. If it was
possible, there would be no need for %{...%}.

An alternative would be to add another flag that says that list-colors
should be percent-expanded. Or add a new parameter that is just like
list-colors but gets percent-expanded. Unlike with raw strings,
computing the length of a string that undergoes percent-expansion is a
solved prompt.


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