Skip to content

Commit 6065af5

Browse files
authored
Merge pull request #1812 from EliahKagan/single
Clarify description of `single` escaping
2 parents 10937b0 + d731a1c commit 6065af5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gix-quote/src/single.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use bstr::{BStr, BString, ByteSlice, ByteVec};
22

33
/// Transforms the given `value` to be suitable for use as an argument for Bourne shells by wrapping it into single quotes.
44
///
5-
/// Every single-quote `'` is escaped with `\'`, every exclamation mark `!` is escaped with `\!`, and the entire string is enclosed
6-
/// in single quotes.
5+
/// Every single-quote `'` is escaped as `'\''`, every exclamation mark `!` is escaped as `'\!'`,
6+
/// and the entire string is enclosed in single quotes.
77
pub fn single(mut value: &BStr) -> BString {
88
let mut quoted = BString::new(b"'".to_vec());
99

0 commit comments

Comments
 (0)