Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-74594

Make QCommandLineParser output optionally machine readable (ie --helpjson) to support auto-completion of process *arguments* in system shells

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core: Other
    • Labels:
      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.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            dfaure_kdab David Faure
            Reporter:
            d3fault d3fault
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes