|
From: | Dmitry Gutov |
Subject: | bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el |
Date: | Wed, 3 Mar 2021 14:47:05 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 03.03.2021 11:52, Gregory Heytings wrote:
Actually, it is possible to truncate output with GNU grep: grep -oE '.{0,100}PATTERN.{0,100}'prints at most 100 characters before and after PATTERN. I find this much better than ripgrep -M.
I'm not sure how to parse that output (it would be quite different from what we get now), and if the one-long-line file has many matches inside, we'll still get them all, which we might or might not want.
[Prev in Thread] | Current Thread | [Next in Thread] |