We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fb141c3 commit a7753d2Copy full SHA for a7753d2
src/lib.rs
@@ -315,8 +315,9 @@ const STREAM_SUFFIX_SIZE: usize = 128 * 1024; // 128KiB
315
/// let c = cmd!(sh, "echo {greeting}!");
316
/// assert_eq!(c.to_string(), r#"echo "hello world!""#);
317
///
318
-/// let c = cmd!(sh, "echo 'spaces '{greeting}' around'");
319
-/// assert_eq!(c.to_string(), r#"echo "spaces hello world around""#);
+/// // Like in the shell, single quotes prevent interpolation:
+/// let c = cmd!(sh, "echo 'spaces '{greeting}' around {greeting}'");
320
+/// assert_eq!(c.to_string(), r#"echo "spaces hello world around {greeting}""#);
321
322
/// # Ok::<(), xshell::Error>(())
323
/// ```
0 commit comments