]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/process.rs
Auto merge of #79115 - cuviper:rust-description, r=Mark-Simulacrum
[rust.git] / library / std / src / process.rs
index ae4a077587565e84bda2787f4d2cd3fe74127105..2c7ed4614bce9e4701c3687481852d265f440eae 100644 (file)
@@ -557,8 +557,10 @@ pub fn new<S: AsRef<OsStr>>(program: S) -> 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.
+    /// 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, substitution, etc.
+    /// have no effect.
     ///
     /// # Examples
     ///
@@ -585,8 +587,10 @@ pub fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut 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.
+    /// Note that the arguments are not passed through a shell, but given
+    /// literally to the program. This means that shell syntax like quotes,
+    /// escaped characters, word splitting, glob patterns, substitution, etc.
+    /// have no effect.
     ///
     /// # Examples
     ///