about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatyáš Racek <panstromek@seznam.cz>2020-10-31 14:40:36 +0100
committerGitHub <noreply@github.com>2020-10-31 14:40:36 +0100
commitd417bbef952bfd213c99f73a706ec785720124a6 (patch)
tree6fe7e0015997dcb02be82a5af952286c57aa61dc
parent3478d7c3607ffbba629af2265c01002771e48c18 (diff)
downloadrust-d417bbef952bfd213c99f73a706ec785720124a6.tar.gz
rust-d417bbef952bfd213c99f73a706ec785720124a6.zip
Add note to process::arg[s] that args shouldn't be escaped or quoted
-rw-r--r--library/std/src/process.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index a1499467744..ae4a0775875 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -557,6 +557,9 @@ impl Command {
     ///
     /// [`args`]: Command::args
     ///
+    /// Note that the argument is passed to the program directly as is, so you shouldn't wrap it in quotes
+    /// or escape special characters the same way you would do that when running the program from terminal.
+    ///
     /// # Examples
     ///
     /// Basic usage:
@@ -582,6 +585,9 @@ impl Command {
     ///
     /// [`arg`]: Command::arg
     ///
+    /// Note that each argument is passed to the program directly as is, so you shouldn't wrap it in quotes
+    /// or escape special characters the same way you would do that when running the program from terminal directly.
+    ///
     /// # Examples
     ///
     /// Basic usage: