Add new -M/--max-columns option.

This permits setting the maximum line width with respect to the number
of bytes in a line. Omitted lines (whether part of a match, replacement
or context) are replaced with a message stating that the line was
elided.

Fixes #129
This commit is contained in:
Ralf Jung
2017-02-02 15:29:50 +01:00
committed by Andrew Gallant
parent 23aec58669
commit d352b79294
5 changed files with 122 additions and 17 deletions

View File

@@ -203,6 +203,10 @@ Project home page: https://github.com/BurntSushi/ripgrep
-L, --follow
: Follow symlinks.
-M, --max-columns *NUM*
: Don't print lines longer than this limit in bytes. Longer lines are omitted,
and only the number of matches in that line is printed.
-m, --max-count *NUM*
: Limit the number of matching lines per file searched to NUM.