Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to define summary for flag options. #756

Open
cristiand391 opened this issue Aug 4, 2023 · 0 comments
Open

Allow to define summary for flag options. #756

cristiand391 opened this issue Aug 4, 2023 · 0 comments
Labels
--help output Related to --help output unlikely Feature we are unlikely to implement waiting for interest Waiting to see if there's strong community interest

Comments

@cristiand391
Copy link
Member

Is your feature request related to a problem? Please describe.
If you have a command with a flag that accepts a set of options like this:
https://github.com/salesforcecli/plugin-deploy-retrieve/blob/cf94d9b10d1256e9cad96f75df3452094b9d4865/src/commands/project/deploy/start.ts#L121

you get those in zsh/powershell completion but plugin-autocomplete can't show any summary/description about them:

Screenshot 2023-08-04 at 14 33 58

Describe the solution you'd like
Allow to define a summary for each flag option so that plugin-autocomplete can set it in completion functions (natively supported):
Screenshot 2023-08-04 at 14 47 48

Describe alternatives you've considered
make flag.options an object containing one 1 object per option

'test-level': testLevelFlag({
      description: messages.getMessage('flags.test-level.description'),
      summary: messages.getMessage('flags.test-level.summary'),
      options: {
        TestLevel.NoTestRun: {
          summary: 'No tests are run'
        }
      },
      helpGroup: testFlags,
    }),

Additional context
We could also update the help logic so that it renders these summaries, in sf we just add all of them in the flag summary:
https://github.com/salesforcecli/plugin-deploy-retrieve/blob/cf94d9b10d1256e9cad96f75df3452094b9d4865/messages/deploy.metadata.md#flagstest-leveldescription

@mdonnalley mdonnalley added help wanted Accepting PRs waiting for interest Waiting to see if there's strong community interest unlikely Feature we are unlikely to implement --help output Related to --help output and removed help wanted Accepting PRs labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--help output Related to --help output unlikely Feature we are unlikely to implement waiting for interest Waiting to see if there's strong community interest
Projects
None yet
Development

No branches or pull requests

2 participants