Explorar el Código

Add old- aliases for old commands

Getty Ritter hace 7 años
padre
commit
695a1ad8bc
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      src/main.rs

+ 2 - 0
src/main.rs

@@ -49,6 +49,8 @@ fn replace(s: &str) -> Option<String> {
         "bench" => "new-bench".to_owned(),
         "freeze" => "new-freeze".to_owned(),
         "haddock" => "new-haddock".to_owned(),
+        s if s.starts_with("old-") =>
+            s.trim_left_matches("old-").to_owned(),
         _ => None?,
     })
 }