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

cli: add nushell completion support #2353

Closed
wants to merge 1 commit into from

Conversation

NyCodeGHG
Copy link
Contributor

@NyCodeGHG NyCodeGHG commented Oct 8, 2023

This PR adds nushell completion support, see #2323
because of clap-rs/clap#5164, this generates invalid nu code for now

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

@NyCodeGHG NyCodeGHG force-pushed the nushell-completions branch from ef5fa7f to e4d228b Compare October 8, 2023 21:10
Copy link
Member

@martinvonz martinvonz left a comment

Choose a reason for hiding this comment

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

Thank you! This looks good to me. Feel free to mark it as ready and merge it.

@necauqua
Copy link
Contributor

One minor thing is that the nix flake app installs completions for the three shells automatically, and I've no idea about nushell support in nix/nixos

I guess somebody who uses both (nix and nushell, that is) will come along to fix that eventually

@NyCodeGHG
Copy link
Contributor Author

I do use nix and I'm trying to move to nushell, but afaik there is no "standard way" for nushell completion files in nix
(please correct me if i'm wrong)

@martinvonz
Copy link
Member

@NyCodeGHG, are you planning to make any changes to this PR?

@NyCodeGHG
Copy link
Contributor Author

are you planning to make any changes to this PR?

No, only clap_complete_nushell needs to be updated once clap-rs/clap#5165 is fixed
But idk if merging it now is a good idea, because it generates invalid nushell code right now

@martinvonz
Copy link
Member

No, only clap_complete_nushell needs to be updated once clap-rs/clap#5165 is fixed
But idk if merging it now is a good idea, because it generates invalid nushell code right now

Ah, I missed that bit. I agree with waiting until we can depend on a fixed version of clap_complete_nushell then. Thanks.

@necauqua
Copy link
Contributor

I do use nix and I'm trying to move to nushell, but afaik there is no "standard way" for nushell completion files in nix (please correct me if i'm wrong)

Yeah, I'm actually checking out nushell now, and yeah there's no support in nix as of now

For future reference, once installShellCompletion from here supports nushell (and nushell supports some form of completion files, not sure that it does right now), we should add a parameter to where we call it in the postInstall derivation step in flake.nix

@nyabinary
Copy link

Any updates on this?

@NyCodeGHG
Copy link
Contributor Author

still blocked by clap_complete_nushell generating invalid code

@poliorcetics
Copy link
Contributor

I've made #3073 and the fix upstream to handle nushell completions

@NyCodeGHG
Copy link
Contributor Author

superseded by #3073
thanks @poliorcetics

@NyCodeGHG NyCodeGHG closed this Feb 17, 2024
@NyCodeGHG NyCodeGHG deleted the nushell-completions branch February 17, 2024 18:48
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

Successfully merging this pull request may close these issues.

6 participants