carlobaldassi / ArgParse.jl

Package for parsing command-line arguments to Julia programs.
Other
236 stars 36 forks source link

print_help() #127

Closed stefanocovino closed 6 months ago

stefanocovino commented 10 months ago

Hello everybody,

Just a quick question, and possibly a suggestion.

Is there an option analogous to the python argparse "print_help()"? It might be useful if you have to check the input data, and in case they are not as needed one wants to show the help message and exit from the script.

Thanks, Stefano

carlobaldassi commented 6 months ago

Yes, there is, it's called show_help. Example:

julia-1.12> using ArgParse

julia-1.12> s = ArgParseSettings("A useful program");

julia-1.12> ArgParse.show_help(s)
usage: <PROGRAM>

A useful program

julia-1.12>