Fix incorrect stringification of suffix with leading colon

This commit is contained in:
Maxime Augier 2021-05-04 19:37:03 +02:00
parent b64a71e2fa
commit 1e6824a1a5

View file

@ -209,7 +209,7 @@ fn stringify(cmd: &str, args: &[&str]) -> String {
Some((suffix, args)) => { Some((suffix, args)) => {
let args = args.join(" "); let args = args.join(" ");
let sp = if args.is_empty() { "" } else { " " }; let sp = if args.is_empty() { "" } else { " " };
let co = if suffix.is_empty() || suffix.contains(' ') { let co = if suffix.is_empty() || suffix.contains(' ') || suffix.starts_with(':') {
":" ":"
} else { } else {
"" ""