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

[turborepo] completion #3802

Closed
malko opened this issue Feb 14, 2023 · 5 comments · Fixed by #7704
Closed

[turborepo] completion #3802

malko opened this issue Feb 14, 2023 · 5 comments · Fixed by #7704
Labels
kind: bug Something isn't working owned-by: turborepo

Comments

@malko
Copy link

malko commented Feb 14, 2023

What version of Turborepo are you using?

1.7.4

  • zsh version: 5.8.1

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux

Describe the Bug

the turbo completion zsh generates a broken completion script for zsh.
If you use it any completion attempt after typing turbo in your zsh will result in:

_arguments:comparguments:325: doubled rest argument definition: *::pass_through_args:

Expected Behavior

having proper completion with the generated script under zsh

To Reproduce

generate a completion script for zsh like this:
turbo completion zsh > /usr/share/zsh/functions/_turbo
open an new shell and try type turbo then hit space bar and then tab => see the error on stdout

Reproduction Repo

No response

@malko malko added area: turborepo kind: bug Something isn't working labels Feb 14, 2023
@malko
Copy link
Author

malko commented Feb 14, 2023

By the way didn't find any info on the completion command at the online documentation, only by performing a turbo --help

@malko
Copy link
Author

malko commented Feb 14, 2023

replacing all *:: and *::: by :: seems to make it work, not sure it preserve all the functionality that was initially intended though.

@chris-olszewski
Copy link
Contributor

This is an upstream issue with the library we use to generate completions. I'll be following clap-rs/clap#4612 and bumping the dependency once the PR lands

@rayzr522
Copy link

bump on this! looks like clap-rs/clap#4612 has been merged and released, it's fixed in clap_complete v4.1.3+ -- I know this is just a small DX issue and not super urgent but would love to see a quick version bump for this!! :3

@AlexAegis
Copy link

This PR might be related, and it landed in clap 4.3.0 clap-rs/clap#4899

arlyon added a commit that referenced this issue Mar 12, 2024
### Description

We had a longstanding issue where completions were broken.
Luckily this is a quick fix, requiring a simple dep bump.

Closes #3802

### Testing Instructions

- pull down the pr
- run `turbo completions zsh` (sub with your shell)
- try to run turbo and hit tab to explore completions


Closes TURBO-2612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working owned-by: turborepo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants