Test: Cargo terminal completions

Open Beginner friendly
#336,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

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.

Description

testplan-item

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:
    [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.

Dominant language
TypeScript
Stars
193k
Forks
42.9k
Avg merge
14h 6m
Merged PRs (30d)
631

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode

All issues in microsoft/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.