jj
jj copied to clipboard
cli: add nushell completion support
This PR adds nushell completion support, see #2323 because of https://github.com/clap-rs/clap/issues/5164, this generates invalid nu code for now
Checklist
If applicable:
- [x] I have updated
CHANGELOG.md - [x] 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
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
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)
@NyCodeGHG, are you planning to make any changes to this PR?
are you planning to make any changes to this PR?
No, only clap_complete_nushell needs to be updated once https://github.com/clap-rs/clap/pull/5165 is fixed But idk if merging it now is a good idea, because it generates invalid nushell code right now
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.
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
Any updates on this?
still blocked by clap_complete_nushell generating invalid code
I've made https://github.com/martinvonz/jj/pull/3073 and the fix upstream to handle nushell completions
superseded by https://github.com/martinvonz/jj/pull/3073 thanks @poliorcetics