-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed as not planned
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(mutate_command_args)]
This is a tracking issue for adding an API to mutate the arguments of std::process::Command.
Discussed earlier in https://internals.rust-lang.org/t/lack-of-api-mutating-args-at-std-command/14908
Public API
// std::process::Command
pub fn args_clear(&mut self) -> &mut Command;
pub fn arg_set<S>(&mut self, index: usize, value: S) -> &mut Command
where
S: AsRef<OsStr>;
// maybe for convenience (same as .args_clear().args(new_args)):
pub fn args_new<I, S>(&mut self, args: I) -> &mut Command
where
I: IntoIterator<Item = S>,
S: AsRef<OsStr>;
arg_set()
may panic when the index is out of range, only existing elements get replaced.
Steps / History
- Implementation:
- Unix Implementation
- Other Platforms
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- None yet.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.