rust-lang / rust-lang/rust

`process::Command::{arg,args}` is now self-contradictory

Open
#123,764 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-docs A-process O-windows T-libs
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

Location

Currently it says

Note that the argument is not passed through a shell, but given literally to the program. This means that shell syntax like quotes, escaped characters, word splitting, glob patterns, variable substitution, etc. have no effect.

But then it adds the Windows-related caveat.

Summary

This states, more or less directly, that the preceding passage is actually a lie, and the reality is that we try to pass the arguments in a way that makes sense, and uses an API that bypasses the shell's command-line-interpreter concerns.

It made sense to land this initially in a "don't modify the existing wording, just plonk down a huge warning" way, but the text itself should be changed to account for the reality.

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.

Research direction

Search the Rust documentation for process::Command::{arg,args} and read the argument-handling note together with its Windows caveat. Revise the wording so it accurately explains the non-shell behavior and platform-specific reality, then check the rendered API documentation for consistency.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.