We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67e18c6 commit 8f0bb34Copy full SHA for 8f0bb34
src/utils.rs
@@ -57,7 +57,16 @@ fn rem_first_and_last(value: &str) -> &str {
57
}
58
59
fn fmt_command(command: &Command) -> String {
60
- let cmd_str_raw = format!("{:?}", command).split("\" \"").join(" ");
+ let cmd_str_raw = format!("{:?}", command)
61
+ .split("\" \"")
62
+ .map(|s| {
63
+ if s.contains('?') || s.contains('!') {
64
+ format!("'{}'", s.replace('\'', "\\'"))
65
+ } else {
66
+ s.to_string()
67
+ }
68
+ })
69
+ .join(" ");
70
rem_first_and_last(&cmd_str_raw).to_string()
71
72
0 commit comments