Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
If QCommandLineParser's help data was output in a machine readable format (json, etc), then shell auto-completion of process arguments could be configured in an automated fashion (at least for Qt apps that use QCommandLineParser). Ideally the output json format would be generic so that Gtk/etc could share the same format.
One could modify QCommandLineParser itself to add this functionality, or create a new class that takes a populated QCommandLineParser in it's constructor (QCommandLineParser might need to declare this new class a "friend", however it's essentially just iterating over the public QCommandLineParser::optionNames and QCommandLineParser::positionalArguments). The latter is probably the cleaner approach.