> How about the following approach:
> 
> ```
>   -q, --query                        retrieve information about packages, in 
> particular:

Yes, that would be an improvement.

However, my worry would be that the user would still need to read the 
description of the first option on the list, in order to comprehend the 
hierarchy. By quickly scanning the list, it would be quite easy to miss. In 
this case, there aren't that many query options, so it may not be a problem, 
but in the case of other sections like "Install/Upgrade/Erase options", this 
problem would be much more pronounced. (And btw, if we did this, we should also 
do the same with the "Install/Upgrade/Erase options" section as well, to keep 
things consistent.)

Another problem is that this relies on an implementation detail where popt just 
happens to list the options in the same order in which they were defined. 
Strictly speaking, there's no guarantee that any particular option would be 
displayed first, which is what this solution relies upon.

Popt just doesn't have support for proper subcommands. You can define a 
hierarchy of tables, which is the closest you can get to something like 
subcommands in Python's argparse, however that has its own drawbacks, such as 
the one you described - that the modes & options would be scattered around and 
hard to follow.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1473#issuecomment-801942642
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to