Skip to content

Commit d417bbe

Browse files
authored
Add note to process::arg[s] that args shouldn't be escaped or quoted
1 parent 3478d7c commit d417bbe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/process.rs

+6
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,9 @@ impl Command {
557557
///
558558
/// [`args`]: Command::args
559559
///
560+
/// Note that the argument is passed to the program directly as is, so you shouldn't wrap it in quotes
561+
/// or escape special characters the same way you would do that when running the program from terminal.
562+
///
560563
/// # Examples
561564
///
562565
/// Basic usage:
@@ -582,6 +585,9 @@ impl Command {
582585
///
583586
/// [`arg`]: Command::arg
584587
///
588+
/// Note that each argument is passed to the program directly as is, so you shouldn't wrap it in quotes
589+
/// or escape special characters the same way you would do that when running the program from terminal directly.
590+
///
585591
/// # Examples
586592
///
587593
/// Basic usage:

0 commit comments

Comments
 (0)