Ripgrep: Text in the `--help` message exceeds 80 columns

Created on 10 Sep 2020  路  3Comments  路  Source: BurntSushi/ripgrep

When using the --help command, the output regularly exceeds 80 columns in width, causing it to awkwardly hard wrap in a standard terminal.

Please limit the help output width to 80 columns. Alternately, you could dynamically check the terminal width and limit output to that width (though that might be a little more complex).

bug

All 3 comments

This is supposed to work. It looks like a bug in clap to me. ripgrep sets max_term_width here, which is documented to do as you describe, AIUI.

cc @kbknapp

I tested this locally (Fedora 32) and seems that max_term_width is behaving as expected.

If I understood correctly @Lokathor would prefer the output to wrap at 80 columns and it is set to 100 columns. I opened #1686 to change that setting. :+1:

No, the output should wrap correctly based on terminal width, even if it's less than 100 columns. As I understand it, clap should be inspecting the terminal size.

This might actually be ripgrep's fault, since I think it is responsible for printing the help message for reasons I forget right now. I'm on mobile.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Deewiant picture Deewiant  路  3Comments

crumblingstatue picture crumblingstatue  路  3Comments

chopfitzroy picture chopfitzroy  路  3Comments

kenorb picture kenorb  路  3Comments

mllg picture mllg  路  3Comments