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

Nushell completions should be added to documentation and --completions (if appropriate) #2135

Closed
starthal opened this issue Jun 6, 2024 · 4 comments

Comments

@starthal
Copy link

starthal commented Jun 6, 2024

It looks like Nushell completions are available in the release tarball.

Current documentation doesn't mention nu completions, and they can't be "generated" at runtime with --completions yet.

The script uses the JSON-parsing invocation suggested in #974, as opposed to a Clap v4 approach. Is there more work to do here or is the current script satisfactory?

@casey
Copy link
Owner

casey commented Jun 8, 2024

Thanks for opening this issue! That's definitely an omission on my part, I never thought about the fact that nushell completions couldn't be generated with the --completions subcommand.

Fixed in #2140, which prints the script with --completions nushell.

Improvements to the current script are welcome. Clap doesn't have nushell support, so the current script was just written by hand.

@casey casey closed this as completed Jun 8, 2024
@starthal
Copy link
Author

FYI this is available now with Clap v4: https://crates.io/crates/clap_complete_nushell

It's maintained by the clap maintainer so I'm guessing it's only separate to clap_complete for stability reasons.

If you believe it would improve maintainability, I could try a PR. But the current script isn't causing an issue for me.

@casey
Copy link
Owner

casey commented Jun 10, 2024

The current script doesn't pose any maintenance issues, but it's very limited. I believe it only completes recipe names and nothing else.

It would be great to integrate clap_complete_nushell, although the script generated by clap_complete_nushell would have to be modified to also complete recipe names. I'll open an issue to track this.

@casey
Copy link
Owner

casey commented Jun 10, 2024

See #2142.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants