File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ pub fn try_repair_file(path: &Path) -> Result<bool> {
324324 if repaired. contains ( "match_command = \" .*\" " ) {
325325 repaired = repaired. replace (
326326 "match_command = \" .*\" " ,
327- "# match_command = \" .*\" # [OMNI: disabled because it intercepts all commands]"
327+ "# match_command = \" .*\" # [OMNI: disabled because it intercepts all commands]" ,
328328 ) ;
329329 changed = true ;
330330 }
Original file line number Diff line number Diff line change @@ -98,7 +98,10 @@ pub fn generate_toml(
9898 let cmd_base = cmd. split_whitespace ( ) . next ( ) . unwrap_or ( cmd) ;
9999 // Ensure we don't accidentally match everything if cmd_base is empty or just special chars
100100 if !cmd_base. is_empty ( ) && cmd_base != "." && cmd_base != "*" {
101- toml. push_str ( & format ! ( "match_command = \" ^{}.*\" \n " , regex:: escape( cmd_base) ) ) ;
101+ toml. push_str ( & format ! (
102+ "match_command = \" ^{}.*\" \n " ,
103+ regex:: escape( cmd_base)
104+ ) ) ;
102105 }
103106 } else {
104107 // Omitting match_command since it's now optional in the parser.
You can’t perform that action at this time.
0 commit comments