I understand Bernhard's concerns, and I have no ideas for improvement at this time on the current design. But Pádraig's idea solves the problem. I can scrutiny and develop an example to talk about and decide on. If you think it will be useful, I will be happy to start. In the end, I checked man-pages and realized descriptions start from the next line when they cannot be in their own place(8 char from the beginning). The type of options does not make a difference. for example df --sync, --help
Thank you so much Arman Absalan On Tue, Dec 8, 2020 at 9:29 PM Pádraig Brady <p...@draigbrady.com> wrote: > On 08/12/2020 17:12, Bernhard Voelker wrote: > > On 12/8/20 12:49 AM, Pádraig Brady wrote: > >> As it happens we're currently working on a more general solution > >> to alignment of --help output, which should address this. > > > > Yes, the idea is to output the usage texts in 3 columns: short option, > > long option and description. The question is if such automatic alignment > > would lead to a nicely readable text. The problem starts with: > > - short options having arguments, > > - several short options for the same thing: rm -r,-R > > - several long options for the same thing: --quiet, --silent > > etc. > > > > Thus said, after fixing the above it would be hard to get better results > > with automatic, columnar alignment without loosing too much space. > > > > In that regard, the programs chroot, comm and join are just violating > > the status quo: they do not align long-only options properly. > > Therefore, I'm 60:40 to start with Arman's patches, yet fixing > > the indentation of the description column in join and comm: see > > attached (squashed) patch. > > > > The only thing which is still a bit annoying is that the indentation > > of the long option and the description via the HELP_OPTION_DESCRIPTION > > and VERSION_OPTION_DESCRIPTION macros do not match that of the program. > > We could address this by passing the number of necessary spaces as > > parameters to the macros (and maybe change them into functions). > > > > WDYT? > > wrt the auto alignment, > I was considering using similar output to that of man pages. > I.E. single char options have descriptions on the same line, > while long options have the description starting on the next line. > Outputting to terminal, we might also highlight the `--option` line > to aid visual delineation. > > Feel free to push Arman's patch, as it does improve things immediately. > > thanks, > Pádraig >