Skip to content

Tracking Issue for native-completion #14520

Open
1 of 1 issue completed
Open
1 of 1 issue completed
@shannmu

Description

@shannmu

Summary

Original issue: #6645

Documentation: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#native-completions

Testing instructions: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#native-completions

Implementation:

Unresolved Issues

  • Some tests are disabled on macOS.
  • Distinguish whether different subcommands require path fallback.
  • Completion candidates generation test code per completer.

Open Questions

  • What should we support?
    • Today, cargo supports bash, zsh
    • Currently, this adds fish, elvish, powershell
    • rustup supports bash, fish, zsh, powershell, elvish
    • Are all of sufficient quality? powershell being the biggest question
  • Should we add custom completer for cargo add <TAB> and cargo install <TAB> using crate.io search API

Future Extensions

  • Completing arguments for third-party subcommands through delegation
    • Stable Cargo has supported this for both bash and zsh already.
  • Add custom completer for cargo <TAB> to cargo scripts
  • Add custom completer for cargo test <TAB> (blocked on json protocol so we can cache the names of tests)
  • Add custom completer for cargo build --profile=<TAB> (feat(complete): Added completion for --profile #15308)
  • Add custom completer for cargo tree --format
    • Inside of {, offer each variable with closing } with a description of the variable
    • Outside of {}, offer each variable inside {} with description

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cliArea: Command-line interface, option parsing, etc.A-completionsArea: shell completionsC-tracking-issueCategory: A tracking issue for something unstable.call-for-testingMarks issues that require broader testing from the community, e.g. before stabilization.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions