Test: Cargo terminal completions
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Refs: #336216
Implementation PR: #305309
- [ ] anyOS
Complexity: 2
Authors: @dmitrivMS, @meganrogge
---
A small smoke test of Cargo terminal completions. One OS and one supported shell (bash, zsh, or PowerShell) are sufficient; no exhaustive command, plugin, or toolchain matrix is needed.
### Setup
- Use a build containing #305309 (a PR build, or Insiders after it lands), with Rust/Cargo available on PATH.
- Enable `terminal.integrated.suggest.enabled` and `terminal.integrated.shellIntegration.enabled`, then open a new integrated terminal.
- Create a disposable project with `cargo new cargo-suggest-smoke --bin --vcs none`, then `cd cargo-suggest-smoke`.
- Append this to the generated `Cargo.toml`:
```toml
[features]
smoke = []
```
Use Ctrl+Space (or the terminal's Show Suggestions action) to request suggestions. Include a trailing space when completing an argument value. Use Tab to accept without running the command, then clear the line between checks.
### Scenarios
- [ ] **Subcommands and insertion:** At `cargo `, verify common subcommands such as `build`, `check`, `run`, and `test` are offered. Type `cargo bu` and accept `build`; verify the command becomes `cargo build` without duplicated text.
- [ ] **Build options:** At `cargo build --`, verify `--release`, `--features`, `--package`, and `--manifest-path` are offered. Accept `--release` and check that the existing command is preserved and is not executed.
- [ ] **Project-aware values:** At `cargo build --features `, verify `smoke` is suggested. At `cargo build --package `, verify `cargo-suggest-smoke` is suggested. Accept one value and check that it is inserted correctly.
- [ ] **Manifest file filtering:** Create an empty `other.toml` beside `Cargo.toml`. At `cargo build --manifest-path `, verify Cargo's file suggestions include `Cargo.toml`, not `other.toml`; directories may still appear. Accept the manifest and verify the inserted path is correct.
For failures, include the OS/shell, the exact command typed, and expected versus actual suggestions. Link reports to this test item and #336216.
Contributor guide
Research direction
Start with a VS Code build containing implementation PR #305309, enable the two terminal settings, and create the disposable project with the provided Cargo commands. Run the listed completion scenarios on one OS and supported shell, checking insertion, project-aware values, and manifest filtering; done means the selected checklist item passes, or failures include the requested environment and exact commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, developer-experience, testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100