Skip to content

Support for getting help text from a plugin command - #12243

Merged
WindSoilder merged 1 commit into
nushell:mainfrom
devyn:plugin-get_help
Mar 23, 2024
Merged

WindSoilder merged 1 commit into
nushell:mainfrom
devyn:plugin-get_help

Conversation

@devyn

@devyn devyn commented Mar 19, 2024

Copy link
Copy Markdown
Contributor

Description

There wasn't really a good way to implement a command group style (e.g. from, query, etc.) command in the past that just returns the help text even if --help is not passed. This adds a new engine call that just does that.

This is actually something I ran into before when developing the dbus plugin, so it's nice to fix it.

User-Facing Changes

Tests + Formatting

  • 🟢 toolkit fmt
  • 🟢 toolkit clippy
  • 🟢 toolkit test
  • 🟢 toolkit test stdlib

After Submitting

  • Document GetHelp engine call in proto

@WindSoilder

Copy link
Copy Markdown
Contributor

Since #12248 is merged, you can apply the new logic here :)

@fdncred fdncred added api-change This PR should be mentioned in #api-updates channel on Discord deprecated:pr-plugins Deprecated: use the A:plugins label instead labels Mar 21, 2024
@fdncred

fdncred commented Mar 23, 2024

Copy link
Copy Markdown
Contributor

if we can fix the conflicts, we can land this.

@devyn

devyn commented Mar 23, 2024

Copy link
Copy Markdown
Contributor Author

I'll fix it up tonight

@abusch

abusch commented Mar 23, 2024

Copy link
Copy Markdown
Contributor

Oh, nice! I ran into that with nu_plugin_semver too.

There wasn't really a good way to implement a command group style (e.g.
`from`, `query`, etc.) command in the past that just returns the help
text even if `--help` is not passed. This adds a new engine call that
just does that.
@devyn
devyn force-pushed the plugin-get_help branch from 5f32268 to eff86aa Compare March 23, 2024 23:11
@devyn

devyn commented Mar 23, 2024

Copy link
Copy Markdown
Contributor Author

Fixed!

@WindSoilder WindSoilder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@WindSoilder
WindSoilder merged commit 78be67f into nushell:main Mar 23, 2024
@hustcer hustcer added this to the v0.92.0 milestone Mar 24, 2024
@devyn
devyn deleted the plugin-get_help branch March 24, 2024 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-change This PR should be mentioned in #api-updates channel on Discord deprecated:pr-plugins Deprecated: use the A:plugins label instead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants