trevorld / r-argparse

command-line optional and positional argument parser
https://trevorldavis.com/R/argparse/
GNU General Public License v2.0
104 stars 11 forks source link

how to deal too long option help info #49

Closed felixlee0608 closed 7 months ago

felixlee0608 commented 1 year ago
image

RT.

how to change new line?

trevorld commented 1 year ago

In the future please make a minimal reproducible example enclosed in a Github markdown

```r
```

block instead of a screenshot...

You could try to use another argparse formatter. In particular one could try ArgumentParser(formatter_class="argparse.RawTextHelpFormatter)" which "maintains whitespace for all sorts of help text, including argument descriptions." You may need to manually enter a bunch of newlines and spaces where you want them but could give you the low-level formatting control you want.

If you switch from {argparse} to {optparse} then it is possible to write you own custom help formatter in R.