Re: Consider escaping special characters like 'less' does
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 17, 2017, 01:13 UTC
- Message-ID
- <xmqqk1zur2yp.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171016221324.stn56gqnliunvcdv@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> Alternatively, I suppose we could just always escape in > add--interactive. I'm trying to think of a case where somebody would > really want their diffFilter to see the raw bytes (or vice versa, to > show raw bytes produced by their filter), but I'm having trouble coming > up with one.
Your patch below only implements the "tame the raw bytes that come out of their filter", which is quite agreeable.
Show 7 quoted lines
> I.e., something like this would probably help your case without hurting > anybody: > ... > > I can't help but feel this is the tip of a larger iceberg, though. E.g., > what about characters outside of the terminal's correct encoding? Or > broken UTF-8 characters?
Hmph. If you use it as a "built-in" that is a fallback for diffFilter, i.e. use it only when the end user does not have one, then users can override whatever wrong thing the built-in logic does so... ;-)