diff --git a/notes b/notes index f2213f7..97ffe05 100644 --- a/notes +++ b/notes @@ -20,6 +20,9 @@ notes - before release: - rewrite grammar.txt +- start with an example justfile +- then installation instructions +- then a long guide - make it clear it's beta, mention that, as a command runner there is probably a higher than normal chance of disaster - change name back to 'just', suggest j as alias @@ -55,8 +58,9 @@ notes enhancements: +- colored error messages - save result of commands in variables -- multi line strings +- multi line strings (maybe not in recipe interpolations) - raw strings - iteration: {{x for x in y}} - allow calling recipes in a justfile in a different directory: diff --git a/src/lib.rs b/src/lib.rs index da6bcfa..a82ed39 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -480,14 +480,14 @@ impl<'a, T: Display> Display for Or<'a, T> { impl<'a> Display for Error<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { try!(write!(f, "justfile:{}: ", self.line)); - + match self.kind { ErrorKind::BadName{name} => { try!(writeln!(f, "name did not match /[a-z](-?[a-z0-9])*/: {}", name)); } ErrorKind::CircularRecipeDependency{recipe, ref circle} => { if circle.len() == 2 { - try!(write!(f, "recipe 1{} depends on itself", recipe)); + try!(write!(f, "recipe {} depends on itself", recipe)); } else { try!(write!(f, "recipe {} has circular dependency: {}", recipe, circle.join(" -> "))); }