Flag order for trimmed line with max length #2456
-
Is there a way to make ripgrep apply the Here's an example of the current result (the string starts with 5 spaces): $ echo " 0123456789abcdefghijklmnopqrstuvwxyz" | rg --trim --max-columns-preview -M 8 abc
012 [... 1 more match] ripgrep reduces the line length, then it trims it. I expected the opposite, like this: $ echo " 0123456789abcdefghijklmnopqrstuvwxyz" | rg --trim --max-columns-preview -M 8 abc
01234567 [... 1 more match] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It does seem like I can't think of any work-around at present. |
Beta Was this translation helpful? Give feedback.
It does seem like
--trim
should just run before-M
. I created an issue to investigate that: #2458. Ideally, we can just fix it to be more sensible. I do not want to get into the business of supporting arbitrary orderings of output format options.I can't think of any work-around at present.