Skip to content

Commit 2a127c3

Browse files
committed
format command fix
1 parent 35cfa2a commit 2a127c3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ fn rem_first_and_last(value: &str) -> &str {
5757
}
5858

5959
fn fmt_command(command: &Command) -> String {
60-
let cmd_str_raw = format!("{:?}", command)
60+
rem_first_and_last(&format!("{:?}", command))
61+
.to_string()
6162
.split("\" \"")
6263
.map(|s| {
6364
if s.contains('?') || s.contains('!') {
@@ -66,8 +67,7 @@ fn fmt_command(command: &Command) -> String {
6667
s.to_string()
6768
}
6869
})
69-
.join(" ");
70-
rem_first_and_last(&cmd_str_raw).to_string()
70+
.join(" ")
7171
}
7272

7373
fn print_command(command: &Command) {

0 commit comments

Comments
 (0)