If the command-line includes this option, the program will not be run. It will print a complete list of all available options along with a short explanation. The options are also grouped by their context. Within each context, the options are sorted alphabetically. Since the options are shown in detail afterwards, the first line of the --help output shows the arguments and if they are optional or not, similar to --usage.
In the --help output of all programs in Gnuastro, the options for each program are classified based on context. The first two contexts are always options to do with the input and output respectively. For example, input image extensions or supplementary input files for the inputs. The last class of options is also fixed in all of Gnuastro, it shows operating mode options. Most of these options are already explained in Operating mode options.
The help message will sometimes be longer than the vertical size of your terminal. If you are using a graphical user interface terminal emulator, you can scroll the terminal with your mouse, but we promised no mice distractions! So here are some suggestions:
less. A pipe is a form of shell re-direction. The
lesstool in Unix-like systems was made exactly for such outputs of any length. You can pipe (
|) the output of any program that is longer than the screen to it and then you can scroll through (up and down) with its many tools. For example:
$ astnoisechisel --help | less
Once you have gone through the text, you can quit
less by pressing the q key.
$ astnoisechisel --help > filename.txt
In case you have a special keyword you are looking for in the help, you do not have to go through the full list. GNU Grep is made for this job. For example, if you only want the list of options whose --help output contains the word “axis” in Crop, you can run the following command:
$ astcrop --help | grep axis
If the output of this option does not fit nicely within the confines of your terminal, GNU does enable you to customize its output through the environment variable
ARGP_HELP_FMT, you can set various parameters which specify the formatting of the help messages.
For example, if your terminals are wider than 70 spaces (say 100) and you feel there is too much empty space between the long options and the short explanation, you can change these formats by giving values to this environment variable before running the program with the --help output.
You can define this environment variable in this manner:
$ export ARGP_HELP_FMT=rmargin=100,opt-doc-col=20
This will affect all GNU programs using GNU C library’s argp.h facilities as long as the environment variable is in memory.
You can see the full list of these formatting parameters in the “Argp User Customization” part of the GNU C library manual.
If you are more comfortable to read the --help outputs of all GNU software in your customized format, you can add your customization (similar to the line above, without the
$ sign) to your ~/.bashrc file.
This is a standard option for all GNU software.