Re: [RFC/PATCH 02/11] ref-filter: add 'colornext' atom
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jul 29, 2015, 21:30 UTC
- Message-ID
- <vpqtwsmd53f.fsf@anie.imag.fr>
- In-Reply-To
- <CAPig+cTb3U2AHjr4wmQGezqHOED3zyYHPG54BjdCZObt=7Mu3w@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
> Also, please explain here and in the commit message why this highly
> specialized colorizer ('colornext'), is needed even though a more
> general purpose one ('color') is already available.It is needed in the current form to allow %(colornext:blue)%(ifexists:[%s]) to color only the replacement of %s and not the [].
But I now think that this would be more elegantly solved by Junio's %(if) %(endif) idea:
%(if:atom) [ %(color:blue)%(atom)%(color:reset) ] %(endif)
(I added spaces for clarity)
-- Matthieu Moy http://www-verimag.imag.fr/~moy/