From 877897201465f143cd42f4a766b35da073c07261 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 11 Jun 2024 22:10:32 +0200 Subject: [PATCH 01/26] Test shell not found error messages (#2145) --- tests/shell.rs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/shell.rs b/tests/shell.rs index a55fb10bd9..7096f7ae19 100644 --- a/tests/shell.rs +++ b/tests/shell.rs @@ -151,3 +151,39 @@ test! { stderr: "echo bar\necho foo\n", shell: false, } + +#[test] +fn recipe_shell_not_found_error_message() { + Test::new() + .justfile( + " + foo: + @echo bar + ", + ) + .shell(false) + .args(["--shell", "NOT_A_REAL_SHELL"]) + .stderr_regex( + "error: Recipe `foo` could not be run because just could not find the shell: .*\n", + ) + .status(1) + .run(); +} + +#[test] +fn backtick_recipe_shell_not_found_error_message() { + Test::new() + .justfile( + " + bar := `echo bar` + + foo: + echo {{bar}} + ", + ) + .shell(false) + .args(["--shell", "NOT_A_REAL_SHELL"]) + .stderr_regex("(?s)error: Backtick could not be run because just could not find the shell:.*") + .status(1) + .run(); +} From 4f16428bcb740dce768d1dbd157ba92f4e5b5e98 Mon Sep 17 00:00:00 2001 From: Ruben Nicolaides Date: Wed, 12 Jun 2024 20:38:37 +0200 Subject: [PATCH 02/26] Use `--justfile` in Fish shell completions (#2148) --- src/completions.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/completions.rs b/src/completions.rs index 193700d98a..3d23d5f6aa 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -94,6 +94,9 @@ export extern "just" [ ]"#; const FISH_RECIPE_COMPLETIONS: &str = r#"function __fish_just_complete_recipes + if string match -rq '(-f|--justfile)\s*=?(?[^\s]+)' -- (string split -- ' -- ' (commandline -pc))[1] + set -fx JUST_JUSTFILE "$justfile" + end just --list 2> /dev/null | tail -n +2 | awk '{ command = $1; args = $0; From 637023e86fda2005a98c022816e15ee6545f86ee Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 13 Jun 2024 12:19:22 -0700 Subject: [PATCH 03/26] Test bare bash path in shebang on windows (#2144) --- tests/lib.rs | 2 ++ tests/windows.rs | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/windows.rs diff --git a/tests/lib.rs b/tests/lib.rs index 18da62d64a..42b3aff14e 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -106,6 +106,8 @@ mod timestamps; mod undefined_variables; mod unexport; mod unstable; +#[cfg(windows)] +mod windows; #[cfg(target_family = "windows")] mod windows_shell; mod working_directory; diff --git a/tests/windows.rs b/tests/windows.rs new file mode 100644 index 0000000000..a839b30129 --- /dev/null +++ b/tests/windows.rs @@ -0,0 +1,15 @@ +use super::*; + +#[test] +fn bare_bash_in_shebang() { + Test::new() + .justfile( + " + default: + #!bash + echo FOO + ", + ) + .stdout("FOO\n") + .run(); +} From 1ce7a05befa8e2c0e3b05f52934087f57a439220 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 13 Jun 2024 12:35:14 -0700 Subject: [PATCH 04/26] Add [positional-arguments] attribute (#2151) --- README.md | 21 +++++++++++++++++--- src/attribute.rs | 4 ++++ src/recipe.rs | 8 ++++++-- tests/positional_arguments.rs | 37 +++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 040639f097..27e0ba5628 100644 --- a/README.md +++ b/README.md @@ -996,6 +996,20 @@ $ just test foo "bar baz" - bar baz ``` +Positional arguments may also be turned on on a per-recipe basis with the +`[positional-arguments]` attributemaster: + +```just +[positional-arguments] +@foo bar: + echo $0 + echo $1 +``` + +Note that PowerShell does not handle positional arguments in the same way as +other shells, so turning on positional arguments will likely break recipes that +use PowerShell. + #### Shell The `shell` setting controls the command used to invoke recipe lines and @@ -1686,6 +1700,7 @@ Recipes may be annotated with attributes that change their behavior. | `[no-cd]`1.9.0 | Don't change directory before executing recipe. | | `[no-exit-message]`1.7.0 | Don't print an error message if recipe fails. | | `[no-quiet]`1.23.0 | Override globally quiet recipes and always echo out the recipe. | +| `[positional-arguments]`master | Turn on [positional arguments](#positional-arguments) for this recipe. | | `[private]`1.10.0 | See [Private Recipes](#private-recipes). | | `[unix]`1.8.0 | Enable recipe on Unixes. (Includes MacOS). | | `[windows]`1.8.0 | Enable recipe on Windows. | @@ -3362,9 +3377,9 @@ foo argument: touch "$1" ``` -This defeats `just`'s ability to catch typos, for example if you type `$2`, but -works for all possible values of `argument`, including those with double -quotes. +This defeats `just`'s ability to catch typos, for example if you type `$2` +instead of `$1`, but works for all possible values of `argument`, including +those with double quotes. #### Exported Arguments diff --git a/src/attribute.rs b/src/attribute.rs index f9c5bfcd53..5e83891f23 100644 --- a/src/attribute.rs +++ b/src/attribute.rs @@ -17,6 +17,7 @@ pub(crate) enum Attribute<'src> { NoCd, NoExitMessage, NoQuiet, + PositionalArguments, Private, Unix, Windows, @@ -32,6 +33,7 @@ impl AttributeDiscriminant { | Self::NoCd | Self::NoExitMessage | Self::NoQuiet + | Self::PositionalArguments | Self::Private | Self::Unix | Self::Windows => 0..=0, @@ -78,6 +80,7 @@ impl<'src> Attribute<'src> { NoCd => Self::NoCd, NoExitMessage => Self::NoExitMessage, NoQuiet => Self::NoQuiet, + PositionalArguments => Self::PositionalArguments, Private => Self::Private, Unix => Self::Unix, Windows => Self::Windows, @@ -98,6 +101,7 @@ impl<'src> Attribute<'src> { | Self::NoCd | Self::NoExitMessage | Self::NoQuiet + | Self::PositionalArguments | Self::Private | Self::Unix | Self::Windows => None, diff --git a/src/recipe.rs b/src/recipe.rs index 13b3bb99a6..e27cc2e034 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -106,6 +106,10 @@ impl<'src, D> Recipe<'src, D> { !self.private && !self.attributes.contains(&Attribute::Private) } + pub(crate) fn takes_positional_arguments(&self, settings: &Settings) -> bool { + settings.positional_arguments || self.attributes.contains(&Attribute::PositionalArguments) + } + pub(crate) fn change_directory(&self) -> bool { !self.attributes.contains(&Attribute::NoCd) } @@ -263,7 +267,7 @@ impl<'src, D> Recipe<'src, D> { cmd.arg(command); - if context.settings.positional_arguments { + if self.takes_positional_arguments(context.settings) { cmd.arg(self.name.lexeme()); cmd.args(positional); } @@ -415,7 +419,7 @@ impl<'src, D> Recipe<'src, D> { output_error, })?; - if context.settings.positional_arguments { + if self.takes_positional_arguments(context.settings) { command.args(positional); } diff --git a/tests/positional_arguments.rs b/tests/positional_arguments.rs index f412f0c3ea..86e4da19d3 100644 --- a/tests/positional_arguments.rs +++ b/tests/positional_arguments.rs @@ -24,6 +24,31 @@ test! { "#, } +test! { + name: linewise_with_attribute, + justfile: r#" + [positional-arguments] + foo bar baz: + echo $0 + echo $1 + echo $2 + echo "$@" + "#, + args: ("foo", "hello", "goodbye"), + stdout: " + foo + hello + goodbye + hello goodbye + ", + stderr: r#" + echo $0 + echo $1 + echo $2 + echo "$@" + "#, +} + test! { name: variadic_linewise, justfile: r#" @@ -51,6 +76,18 @@ test! { stdout: "hello\n", } +test! { + name: shebang_with_attribute, + justfile: " + [positional-arguments] + foo bar: + #!/bin/sh + echo $1 + ", + args: ("foo", "hello"), + stdout: "hello\n", +} + test! { name: variadic_shebang, justfile: r#" From 4b5ba8f6f57fd3986d598d5bc3917a2fe36e637f Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 13 Jun 2024 13:21:00 -0700 Subject: [PATCH 05/26] Load environment file from dotenv-path relative to working directory (#2152) --- src/load_dotenv.rs | 3 ++- tests/dotenv.rs | 19 +++++++++++++++++++ tests/test.rs | 5 +++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/load_dotenv.rs b/src/load_dotenv.rs index c867e9735d..29b31b2433 100644 --- a/src/load_dotenv.rs +++ b/src/load_dotenv.rs @@ -24,8 +24,9 @@ pub(crate) fn load_dotenv( } if let Some(path) = dotenv_path { + let path = working_directory.join(path); if path.is_file() { - return load_from_file(&working_directory.join(path)); + return load_from_file(&path); } } diff --git a/tests/dotenv.rs b/tests/dotenv.rs index 8e50467c92..3c8df84172 100644 --- a/tests/dotenv.rs +++ b/tests/dotenv.rs @@ -360,6 +360,7 @@ fn no_dotenv() { .stderr("echo DEFAULT\n") .run(); } + #[test] fn dotenv_env_var_override() { Test::new() @@ -375,3 +376,21 @@ fn dotenv_env_var_override() { .stderr("echo $DOTENV_KEY\n") .run(); } + +#[test] +fn dotenv_path_usable_from_subdir() { + Test::new() + .justfile( + " + set dotenv-path := '.custom-env' + + @echo: + echo $DOTENV_KEY + ", + ) + .create_dir("sub") + .current_dir("sub") + .write(".custom-env", "DOTENV_KEY=dotenv-value") + .stdout("dotenv-value\n") + .run(); +} diff --git a/tests/test.rs b/tests/test.rs index e241d7e2f2..29350351d6 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -94,6 +94,11 @@ impl Test { self } + pub(crate) fn create_dir(self, path: impl AsRef) -> Self { + fs::create_dir_all(self.tempdir.path().join(path.as_ref())).unwrap(); + self + } + pub(crate) fn current_dir(mut self, path: impl AsRef) -> Self { path.as_ref().clone_into(&mut self.current_dir); self From e1b17fe9cfbb0d188d5677f9ca5b9a1de319b00c Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 13 Jun 2024 14:41:19 -0700 Subject: [PATCH 06/26] Document shell expanded string defaults (#2153) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 27e0ba5628..41adab6786 100644 --- a/README.md +++ b/README.md @@ -1314,6 +1314,7 @@ foobar := x'~/$FOO/${BAR}' |------|-------------| | `$VAR` | value of environment variable `VAR` | | `${VAR}` | value of environment variable `VAR` | +| `${VAR:-DEFAULT}` | value of environment variable `VAR`, or `DEFAULT` if `VAR` is not set | | Leading `~` | path to current user's home directory | | Leading `~USER` | path to `USER`'s home directory | From 18ec9796b97614f523d243102eb5c7f9849a044c Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 13 Jun 2024 19:41:45 -0700 Subject: [PATCH 07/26] Improve argument parsing and error handling for submodules (#2154) --- src/argument_parser.rs | 403 +++++++++++++++++++++++++++++++++++++++++ src/error.rs | 18 +- src/justfile.rs | 208 +++++++-------------- src/lib.rs | 3 +- src/subcommand.rs | 14 +- src/testing.rs | 2 +- tests/misc.rs | 2 +- tests/modules.rs | 93 +++++++++- 8 files changed, 588 insertions(+), 155 deletions(-) create mode 100644 src/argument_parser.rs diff --git a/src/argument_parser.rs b/src/argument_parser.rs new file mode 100644 index 0000000000..85dacccea6 --- /dev/null +++ b/src/argument_parser.rs @@ -0,0 +1,403 @@ +use super::*; + +#[allow(clippy::doc_markdown)] +/// The argument parser is responsible for grouping positional arguments into +/// argument groups, which consist of a path to a recipe and its arguments. +/// +/// Argument parsing is substantially complicated by the fact that recipe paths +/// can be given on the command line as multiple arguments, i.e., "foo" "bar" +/// baz", or as a single "::"-separated argument. +/// +/// Error messages produced by the argument parser should use the format of the +/// recipe path as passed on the command line. +/// +/// Additionally, if a recipe is specified with a "::"-separated path, extra +/// components of that path after a valid recipe must not be used as arguments, +/// whereas arguments after multiple argument path may be used as arguments. As +/// an example, `foo bar baz` may refer to recipe `foo::bar` with argument +/// `baz`, but `foo::bar::baz` is an error, since `bar` is a recipe, not a +/// module. +pub(crate) struct ArgumentParser<'src: 'run, 'run> { + arguments: &'run [&'run str], + next: usize, + root: &'run Justfile<'src>, +} + +#[derive(Debug, PartialEq)] +pub(crate) struct ArgumentGroup<'run> { + pub(crate) arguments: Vec<&'run str>, + pub(crate) path: Vec, +} + +impl<'src: 'run, 'run> ArgumentParser<'src, 'run> { + pub(crate) fn parse_arguments( + root: &'run Justfile<'src>, + arguments: &'run [&'run str], + ) -> RunResult<'src, Vec>> { + let mut groups = Vec::new(); + + let mut invocation_parser = Self { + arguments, + next: 0, + root, + }; + + loop { + groups.push(invocation_parser.parse_group()?); + + if invocation_parser.next == arguments.len() { + break; + } + } + + Ok(groups) + } + + fn parse_group(&mut self) -> RunResult<'src, ArgumentGroup<'run>> { + let (recipe, path) = if let Some(next) = self.next() { + if next.contains(':') { + let module_path = + ModulePath::try_from([next].as_slice()).map_err(|()| Error::UnknownRecipe { + recipe: next.into(), + suggestion: None, + })?; + let (recipe, path, _) = self.resolve_recipe(true, &module_path.path)?; + self.next += 1; + (recipe, path) + } else { + let (recipe, path, consumed) = self.resolve_recipe(false, self.rest())?; + self.next += consumed; + (recipe, path) + } + } else { + let (recipe, path, consumed) = self.resolve_recipe(false, self.rest())?; + assert_eq!(consumed, 0); + (recipe, path) + }; + + let rest = self.rest(); + + let argument_range = recipe.argument_range(); + let argument_count = cmp::min(rest.len(), recipe.max_arguments()); + if !argument_range.range_contains(&argument_count) { + return Err(Error::ArgumentCountMismatch { + recipe: recipe.name(), + parameters: recipe.parameters.clone(), + found: rest.len(), + min: recipe.min_arguments(), + max: recipe.max_arguments(), + }); + } + + let arguments = rest[..argument_count].to_vec(); + + self.next += argument_count; + + Ok(ArgumentGroup { arguments, path }) + } + + fn resolve_recipe( + &self, + module_path: bool, + args: &[impl AsRef], + ) -> RunResult<'src, (&'run Recipe<'src>, Vec, usize)> { + let mut current = self.root; + let mut path = Vec::new(); + + for (i, arg) in args.iter().enumerate() { + let arg = arg.as_ref(); + + path.push(arg.to_string()); + + if let Some(module) = current.modules.get(arg) { + current = module; + } else if let Some(recipe) = current.get_recipe(arg) { + if module_path && i + 1 < args.len() { + return Err(Error::ExpectedSubmoduleButFoundRecipe { + path: if module_path { + path.join("::") + } else { + path.join(" ") + }, + }); + } + return Ok((recipe, path, i + 1)); + } else { + if module_path && i + 1 < args.len() { + return Err(Error::UnknownSubmodule { + path: path.join("::"), + }); + } + + return Err(Error::UnknownRecipe { + recipe: if module_path { + path.join("::") + } else { + path.join(" ") + }, + suggestion: current.suggest_recipe(arg), + }); + } + } + + if let Some(recipe) = ¤t.default { + recipe.check_can_be_default_recipe()?; + path.push(recipe.name().into()); + Ok((recipe, path, args.len())) + } else if current.recipes.is_empty() { + Err(Error::NoRecipes) + } else { + Err(Error::NoDefaultRecipe) + } + } + + fn next(&self) -> Option<&'run str> { + self.arguments.get(self.next).copied() + } + + fn rest(&self) -> &[&'run str] { + &self.arguments[self.next..] + } +} + +#[cfg(test)] +mod tests { + use {super::*, tempfile::TempDir}; + + trait TempDirExt { + fn write(&self, path: &str, content: &str); + } + + impl TempDirExt for TempDir { + fn write(&self, path: &str, content: &str) { + let path = self.path().join(path); + fs::create_dir_all(path.parent().unwrap()).unwrap(); + fs::write(path, content).unwrap(); + } + } + + #[test] + fn single_no_arguments() { + let justfile = testing::compile("foo:"); + + assert_eq!( + ArgumentParser::parse_arguments(&justfile, &["foo"]).unwrap(), + vec![ArgumentGroup { + path: vec!["foo".into()], + arguments: Vec::new() + }], + ); + } + + #[test] + fn single_with_argument() { + let justfile = testing::compile("foo bar:"); + + assert_eq!( + ArgumentParser::parse_arguments(&justfile, &["foo", "baz"]).unwrap(), + vec![ArgumentGroup { + path: vec!["foo".into()], + arguments: vec!["baz"], + }], + ); + } + + #[test] + fn single_argument_count_mismatch() { + let justfile = testing::compile("foo bar:"); + + assert_matches!( + ArgumentParser::parse_arguments(&justfile, &["foo"]).unwrap_err(), + Error::ArgumentCountMismatch { + recipe: "foo", + found: 0, + min: 1, + max: 1, + .. + }, + ); + } + + #[test] + fn single_unknown() { + let justfile = testing::compile("foo:"); + + assert_matches!( + ArgumentParser::parse_arguments(&justfile, &["bar"]).unwrap_err(), + Error::UnknownRecipe { + recipe, + suggestion: None + } if recipe == "bar", + ); + } + + #[test] + fn multiple_unknown() { + let justfile = testing::compile("foo:"); + + assert_matches!( + ArgumentParser::parse_arguments(&justfile, &["bar", "baz"]).unwrap_err(), + Error::UnknownRecipe { + recipe, + suggestion: None + } if recipe == "bar", + ); + } + + #[test] + fn recipe_in_submodule() { + let loader = Loader::new(); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().join("justfile"); + fs::write(&path, "mod foo").unwrap(); + fs::create_dir(tempdir.path().join("foo")).unwrap(); + fs::write(tempdir.path().join("foo/mod.just"), "bar:").unwrap(); + let compilation = Compiler::compile(true, &loader, &path).unwrap(); + + assert_eq!( + ArgumentParser::parse_arguments(&compilation.justfile, &["foo", "bar"]).unwrap(), + vec![ArgumentGroup { + path: vec!["foo".into(), "bar".into()], + arguments: Vec::new() + }], + ); + } + + #[test] + fn recipe_in_submodule_unknown() { + let loader = Loader::new(); + let tempdir = tempfile::tempdir().unwrap(); + let path = tempdir.path().join("justfile"); + fs::write(&path, "mod foo").unwrap(); + fs::create_dir(tempdir.path().join("foo")).unwrap(); + fs::write(tempdir.path().join("foo/mod.just"), "bar:").unwrap(); + let compilation = Compiler::compile(true, &loader, &path).unwrap(); + + assert_matches!( + ArgumentParser::parse_arguments(&compilation.justfile, &["foo", "zzz"]).unwrap_err(), + Error::UnknownRecipe { + recipe, + suggestion: None + } if recipe == "foo zzz", + ); + } + + #[test] + fn recipe_in_submodule_path_unknown() { + let tempdir = tempfile::tempdir().unwrap(); + tempdir.write("justfile", "mod foo"); + tempdir.write("foo.just", "bar:"); + + let loader = Loader::new(); + let compilation = Compiler::compile(true, &loader, &tempdir.path().join("justfile")).unwrap(); + + assert_matches!( + ArgumentParser::parse_arguments(&compilation.justfile, &["foo::zzz"]).unwrap_err(), + Error::UnknownRecipe { + recipe, + suggestion: None + } if recipe == "foo::zzz", + ); + } + + #[test] + fn module_path_not_consumed() { + let tempdir = tempfile::tempdir().unwrap(); + tempdir.write("justfile", "mod foo"); + tempdir.write("foo.just", "bar:"); + + let loader = Loader::new(); + let compilation = Compiler::compile(true, &loader, &tempdir.path().join("justfile")).unwrap(); + + assert_matches!( + ArgumentParser::parse_arguments(&compilation.justfile, &["foo::bar::baz"]).unwrap_err(), + Error::ExpectedSubmoduleButFoundRecipe { + path, + } if path == "foo::bar", + ); + } + + #[test] + fn no_recipes() { + let tempdir = tempfile::tempdir().unwrap(); + tempdir.write("justfile", ""); + + let loader = Loader::new(); + let compilation = Compiler::compile(true, &loader, &tempdir.path().join("justfile")).unwrap(); + + assert_matches!( + ArgumentParser::parse_arguments(&compilation.justfile, &[]).unwrap_err(), + Error::NoRecipes, + ); + } + + #[test] + fn default_recipe_requires_arguments() { + let tempdir = tempfile::tempdir().unwrap(); + tempdir.write("justfile", "foo bar:"); + + let loader = Loader::new(); + let compilation = Compiler::compile(true, &loader, &tempdir.path().join("justfile")).unwrap(); + + assert_matches!( + ArgumentParser::parse_arguments(&compilation.justfile, &[]).unwrap_err(), + Error::DefaultRecipeRequiresArguments { + recipe: "foo", + min_arguments: 1, + }, + ); + } + + #[test] + fn no_default_recipe() { + let tempdir = tempfile::tempdir().unwrap(); + tempdir.write("justfile", "import 'foo.just'"); + tempdir.write("foo.just", "bar:"); + + let loader = Loader::new(); + let compilation = Compiler::compile(true, &loader, &tempdir.path().join("justfile")).unwrap(); + + assert_matches!( + ArgumentParser::parse_arguments(&compilation.justfile, &[]).unwrap_err(), + Error::NoDefaultRecipe, + ); + } + + #[test] + fn complex_grouping() { + let justfile = testing::compile( + " +FOO A B='blarg': + echo foo: {{A}} {{B}} + +BAR X: + echo bar: {{X}} + +BAZ +Z: + echo baz: {{Z}} +", + ); + + assert_eq!( + ArgumentParser::parse_arguments( + &justfile, + &["BAR", "0", "FOO", "1", "2", "BAZ", "3", "4", "5"] + ) + .unwrap(), + vec![ + ArgumentGroup { + path: vec!["BAR".into()], + arguments: vec!["0"], + }, + ArgumentGroup { + path: vec!["FOO".into()], + arguments: vec!["1", "2"], + }, + ArgumentGroup { + path: vec!["BAZ".into()], + arguments: vec!["3", "4", "5"], + }, + ], + ); + } +} diff --git a/src/error.rs b/src/error.rs index 63785d4370..ca2acb153a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -95,6 +95,9 @@ pub(crate) enum Error<'src> { variable: String, suggestion: Option>, }, + ExpectedSubmoduleButFoundRecipe { + path: String, + }, FormatCheckFoundDiff, FunctionCall { function: Name<'src>, @@ -162,13 +165,13 @@ pub(crate) enum Error<'src> { line_number: Option, }, UnknownSubmodule { - path: ModulePath, + path: String, }, UnknownOverrides { overrides: Vec, }, - UnknownRecipes { - recipes: Vec, + UnknownRecipe { + recipe: String, suggestion: Option>, }, Unstable { @@ -365,6 +368,9 @@ impl<'src> ColorDisplay for Error<'src> { write!(f, "\n{suggestion}")?; } } + ExpectedSubmoduleButFoundRecipe { path } => { + write!(f, "Expected submodule at `{path}` but found recipe.")?; + }, FormatCheckFoundDiff => { write!(f, "Formatted justfile differs from original.")?; } @@ -447,10 +453,8 @@ impl<'src> ColorDisplay for Error<'src> { let overrides = List::and_ticked(overrides); write!(f, "{count} {overrides} overridden on the command line but not present in justfile")?; } - UnknownRecipes { recipes, suggestion } => { - let count = Count("recipe", recipes.len()); - let recipes = List::or_ticked(recipes); - write!(f, "Justfile does not contain {count} {recipes}.")?; + UnknownRecipe { recipe, suggestion } => { + write!(f, "Justfile does not contain recipe `{recipe}`.")?; if let Some(suggestion) = suggestion { write!(f, "\n{suggestion}")?; } diff --git a/src/justfile.rs b/src/justfile.rs index 5b3f0bf74d..e108eb91a8 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -173,66 +173,26 @@ impl<'src> Justfile<'src> { _ => {} } - let mut remaining: Vec<&str> = if !arguments.is_empty() { - arguments.iter().map(String::as_str).collect() - } else if let Some(recipe) = &self.default { - recipe.check_can_be_default_recipe()?; - vec![recipe.name()] - } else if self.recipes.is_empty() { - return Err(Error::NoRecipes); - } else { - return Err(Error::NoDefaultRecipe); - }; + let arguments = arguments.iter().map(String::as_str).collect::>(); - let mut missing = Vec::new(); - let mut invocations = Vec::new(); - let mut scopes = BTreeMap::new(); - let arena: Arena = Arena::new(); - - while let Some(first) = remaining.first().copied() { - if first.contains("::") - && !(first.starts_with(':') || first.ends_with(':') || first.contains(":::")) - { - remaining = first - .split("::") - .chain(remaining[1..].iter().copied()) - .collect(); - - continue; - } + let groups = ArgumentParser::parse_arguments(self, &arguments)?; - let rest = &remaining[1..]; + let arena: Arena = Arena::new(); + let mut invocations = Vec::::new(); + let mut scopes = BTreeMap::new(); - if let Some((invocation, consumed)) = self.invocation( - 0, - &mut Vec::new(), + for group in &groups { + invocations.push(self.invocation( &arena, - &mut scopes, + &group.arguments, config, &dotenv, - search, &scope, - first, - rest, - )? { - remaining = rest[consumed..].to_vec(); - invocations.push(invocation); - } else { - missing.push(first.to_string()); - remaining = rest.to_vec(); - } - } - - if !missing.is_empty() { - let suggestion = if missing.len() == 1 { - self.suggest_recipe(missing.first().unwrap()) - } else { - None - }; - return Err(Error::UnknownRecipes { - recipes: missing, - suggestion, - }); + &group.path, + 0, + &mut scopes, + search, + )?); } let mut ran = Ran::default(); @@ -278,21 +238,29 @@ impl<'src> Justfile<'src> { fn invocation<'run>( &'run self, - depth: usize, - path: &mut Vec<&'run str>, arena: &'run Arena>, - scopes: &mut BTreeMap, &'run Scope<'src, 'run>>, + arguments: &[&'run str], config: &'run Config, dotenv: &'run BTreeMap, - search: &'run Search, parent: &'run Scope<'src, 'run>, - first: &'run str, - rest: &[&'run str], - ) -> RunResult<'src, Option<(Invocation<'src, 'run>, usize)>> { - if let Some(module) = self.modules.get(first) { - path.push(first); + path: &'run [String], + position: usize, + scopes: &mut BTreeMap<&'run [String], &'run Scope<'src, 'run>>, + search: &'run Search, + ) -> RunResult<'src, Invocation<'src, 'run>> { + if position + 1 == path.len() { + let recipe = self.get_recipe(&path[position]).unwrap(); + Ok(Invocation { + recipe, + module_source: &self.source, + arguments: arguments.into(), + settings: &self.settings, + scope: parent, + }) + } else { + let module = self.modules.get(&path[position]).unwrap(); - let scope = if let Some(scope) = scopes.get(path) { + let scope = if let Some(scope) = scopes.get(&path[..position]) { scope } else { let scope = Evaluator::evaluate_assignments( @@ -304,76 +272,21 @@ impl<'src> Justfile<'src> { search, )?; let scope = arena.alloc(scope); - scopes.insert(path.clone(), scope); + scopes.insert(path, scope); scopes.get(path).unwrap() }; - if rest.is_empty() { - if let Some(recipe) = &module.default { - recipe.check_can_be_default_recipe()?; - return Ok(Some(( - Invocation { - settings: &module.settings, - recipe, - arguments: Vec::new(), - scope, - module_source: &self.source, - }, - depth, - ))); - } - Err(Error::NoDefaultRecipe) - } else { - module.invocation( - depth + 1, - path, - arena, - scopes, - config, - dotenv, - search, - scope, - rest[0], - &rest[1..], - ) - } - } else if let Some(recipe) = self.get_recipe(first) { - if recipe.parameters.is_empty() { - Ok(Some(( - Invocation { - arguments: Vec::new(), - recipe, - scope: parent, - settings: &self.settings, - module_source: &self.source, - }, - depth, - ))) - } else { - let argument_range = recipe.argument_range(); - let argument_count = cmp::min(rest.len(), recipe.max_arguments()); - if !argument_range.range_contains(&argument_count) { - return Err(Error::ArgumentCountMismatch { - recipe: recipe.name(), - parameters: recipe.parameters.clone(), - found: rest.len(), - min: recipe.min_arguments(), - max: recipe.max_arguments(), - }); - } - Ok(Some(( - Invocation { - arguments: rest[..argument_count].to_vec(), - recipe, - scope: parent, - settings: &self.settings, - module_source: &self.source, - }, - depth + argument_count, - ))) - } - } else { - Ok(None) + module.invocation( + arena, + arguments, + config, + dotenv, + scope, + path, + position + 1, + scopes, + search, + ) } } @@ -523,21 +436,38 @@ mod tests { use Error::*; run_error! { - name: unknown_recipes, + name: unknown_recipe_no_suggestion, src: "a:\nb:\nc:", - args: ["a", "x", "y", "z"], - error: UnknownRecipes { - recipes, + args: ["a", "xyz", "y", "z"], + error: UnknownRecipe { + recipe, suggestion, }, check: { - assert_eq!(recipes, &["x", "y", "z"]); + assert_eq!(recipe, "xyz"); assert_eq!(suggestion, None); } } run_error! { - name: unknown_recipes_show_alias_suggestion, + name: unknown_recipe_with_suggestion, + src: "a:\nb:\nc:", + args: ["a", "x", "y", "z"], + error: UnknownRecipe { + recipe, + suggestion, + }, + check: { + assert_eq!(recipe, "x"); + assert_eq!(suggestion, Some(Suggestion { + name: "a", + target: None, + })); + } + } + + run_error! { + name: unknown_recipe_show_alias_suggestion, src: " foo: echo foo @@ -545,12 +475,12 @@ mod tests { alias z := foo ", args: ["zz"], - error: UnknownRecipes { - recipes, + error: UnknownRecipe { + recipe, suggestion, }, check: { - assert_eq!(recipes, &["zz"]); + assert_eq!(recipe, "zz"); assert_eq!(suggestion, Some(Suggestion { name: "z", target: Some("foo"), diff --git a/src/lib.rs b/src/lib.rs index a315a84129..5275cecf91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ pub(crate) use { crate::{ - alias::Alias, analyzer::Analyzer, assignment::Assignment, + alias::Alias, analyzer::Analyzer, argument_parser::ArgumentParser, assignment::Assignment, assignment_resolver::AssignmentResolver, ast::Ast, attribute::Attribute, binding::Binding, color::Color, color_display::ColorDisplay, command_ext::CommandExt, compilation::Compilation, compile_error::CompileError, compile_error_kind::CompileErrorKind, compiler::Compiler, @@ -113,6 +113,7 @@ pub mod summary; mod alias; mod analyzer; +mod argument_parser; mod assignment; mod assignment_resolver; mod ast; diff --git a/src/subcommand.rs b/src/subcommand.rs index 450ffa3353..68b31095c6 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -150,7 +150,7 @@ impl Subcommand { }; match Self::run_inner(config, loader, arguments, overrides, &search) { - Err((err @ Error::UnknownRecipes { .. }, true)) => { + Err((err @ Error::UnknownRecipe { .. }, true)) => { match search.justfile.parent().unwrap().parent() { Some(parent) => { unknown_recipes_errors.get_or_insert(err); @@ -428,7 +428,9 @@ impl Subcommand { module = module .modules .get(name) - .ok_or_else(|| Error::UnknownSubmodule { path: path.clone() })?; + .ok_or_else(|| Error::UnknownSubmodule { + path: path.to_string(), + })?; } Self::list_module(config, module, 0); @@ -588,7 +590,9 @@ impl Subcommand { module = module .modules .get(name) - .ok_or_else(|| Error::UnknownSubmodule { path: path.clone() })?; + .ok_or_else(|| Error::UnknownSubmodule { + path: path.to_string(), + })?; } let name = path.path.last().unwrap(); @@ -602,8 +606,8 @@ impl Subcommand { println!("{}", recipe.color_display(config.color.stdout())); Ok(()) } else { - Err(Error::UnknownRecipes { - recipes: vec![name.to_owned()], + Err(Error::UnknownRecipe { + recipe: name.to_owned(), suggestion: module.suggest_recipe(name), }) } diff --git a/src/testing.rs b/src/testing.rs index a597769267..5167bc899d 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -131,7 +131,7 @@ macro_rules! run_error { } macro_rules! assert_matches { - ($expression:expr, $( $pattern:pat_param )|+ $( if $guard:expr )?) => { + ($expression:expr, $( $pattern:pat_param )|+ $( if $guard:expr )? $(,)?) => { match $expression { $( $pattern )|+ $( if $guard )? => {} left => panic!( diff --git a/tests/misc.rs b/tests/misc.rs index a42e1be37b..ad1055a9d2 100644 --- a/tests/misc.rs +++ b/tests/misc.rs @@ -652,7 +652,7 @@ test! { justfile: "hello:", args: ("foo", "bar"), stdout: "", - stderr: "error: Justfile does not contain recipes `foo` or `bar`.\n", + stderr: "error: Justfile does not contain recipe `foo`.\n", status: EXIT_FAILURE, } diff --git a/tests/modules.rs b/tests/modules.rs index 5cccf4e293..43a125417b 100644 --- a/tests/modules.rs +++ b/tests/modules.rs @@ -115,7 +115,7 @@ fn missing_recipe_after_invalid_path() { .test_round_trip(false) .arg(":foo::foo") .arg("bar") - .stderr("error: Justfile does not contain recipes `:foo::foo` or `bar`.\n") + .stderr("error: Justfile does not contain recipe `:foo::foo`.\n") .status(EXIT_FAILURE) .run(); } @@ -690,3 +690,94 @@ fn recipes_with_same_name_are_both_run() { .stdout("MODULE\nROOT\n") .run(); } + +#[test] +fn submodule_recipe_not_found_error_message() { + Test::new() + .args(["--unstable", "foo::bar"]) + .stderr("error: Justfile does not contain submodule `foo`\n") + .status(1) + .run(); +} + +#[test] +fn submodule_recipe_not_found_spaced_error_message() { + Test::new() + .write("foo.just", "bar:\n @echo MODULE") + .justfile( + " + mod foo + ", + ) + .test_round_trip(false) + .args(["--unstable", "foo", "baz"]) + .stderr("error: Justfile does not contain recipe `foo baz`.\nDid you mean `bar`?\n") + .status(1) + .run(); +} + +#[test] +fn submodule_recipe_not_found_colon_separated_error_message() { + Test::new() + .write("foo.just", "bar:\n @echo MODULE") + .justfile( + " + mod foo + ", + ) + .test_round_trip(false) + .args(["--unstable", "foo::baz"]) + .stderr("error: Justfile does not contain recipe `foo::baz`.\nDid you mean `bar`?\n") + .status(1) + .run(); +} + +#[test] +fn colon_separated_path_does_not_run_recipes() { + Test::new() + .justfile( + " + foo: + @echo FOO + + bar: + @echo BAR + ", + ) + .args(["--unstable", "foo::bar"]) + .stderr("error: Expected submodule at `foo` but found recipe.\n") + .status(1) + .run(); +} + +#[test] +fn expected_submodule_but_found_recipe_in_root_error() { + Test::new() + .justfile("foo:") + .arg("foo::baz") + .stderr("error: Expected submodule at `foo` but found recipe.\n") + .status(1) + .run(); +} + +#[test] +fn expected_submodule_but_found_recipe_in_submodule_error() { + Test::new() + .justfile("mod foo") + .write("foo.just", "bar:") + .test_round_trip(false) + .args(["--unstable", "foo::bar::baz"]) + .stderr("error: Expected submodule at `foo::bar` but found recipe.\n") + .status(1) + .run(); +} + +#[test] +fn colon_separated_path_components_are_not_used_as_arguments() { + Test::new() + .justfile("foo bar:") + .args(["foo::bar"]) + .stderr("error: Expected submodule at `foo` but found recipe.\n") + .status(1) + .run(); +} From e6c37aacd1037bdcc89c5337da0ec08762cb1729 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Thu, 13 Jun 2024 19:57:12 -0700 Subject: [PATCH 08/26] Release 1.29.0 (#2155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump version: 1.28.0 → 1.29.0 - Update changelog - Update changelog contributor credits - Update dependencies - Update version references in readme - Fix zsh completion script --- CHANGELOG.md | 23 ++++++++++++++++++ Cargo.lock | 58 ++++++++++++++++++++++---------------------- Cargo.toml | 2 +- README.md | 6 ++--- src/completions.rs | 2 +- tests/completions.rs | 6 ++++- 6 files changed, 62 insertions(+), 35 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4da782455..bc5b6bf7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,29 @@ Changelog ========= +[1.29.0](https://github.com/casey/just/releases/tag/1.29.0) - 2024-06-13 +------------------------------------------------------------------------ + +### Added +- Add [positional-arguments] attribute ([#2151](https://github.com/casey/just/pull/2151)) +- Use `--justfile` in Fish shell completions ([#2148](https://github.com/casey/just/pull/2148) by [rubot](https://github.com/rubot)) +- Add `is_dependency()` function ([#2139](https://github.com/casey/just/pull/2139) by [neunenak](https://github.com/neunenak)) +- Allow printing nu completion script with `just --completions nushell` ([#2140](https://github.com/casey/just/pull/2140)) +- Add `[ATTRIBUTE: VALUE]` shorthand ([#2136](https://github.com/casey/just/pull/2136) by [neunenak](https://github.com/neunenak)) +- Allow unexporting environment variables ([#2098](https://github.com/casey/just/pull/2098) by [neunenak](https://github.com/neunenak)) + +### Fixed +- Load environment file from dotenv-path relative to working directory ([#2152](https://github.com/casey/just/pull/2152)) +- Fix `fzf` chooser preview with space-separated module paths ([#2141](https://github.com/casey/just/pull/2141)) + +### Misc +- Improve argument parsing and error handling for submodules ([#2154](https://github.com/casey/just/pull/2154)) +- Document shell expanded string defaults ([#2153](https://github.com/casey/just/pull/2153)) +- Test bare bash path in shebang on windows ([#2144](https://github.com/casey/just/pull/2144)) +- Test shell not found error messages ([#2145](https://github.com/casey/just/pull/2145)) +- Refactor evaluator ([#2138](https://github.com/casey/just/pull/2138) by [neunenak](https://github.com/neunenak)) +- Fix man page generation in release workflow ([#2132](https://github.com/casey/just/pull/2132)) + [1.28.0](https://github.com/casey/just/releases/tag/1.28.0) - 2024-06-05 ------------------------------------------------------------------------ diff --git a/Cargo.lock b/Cargo.lock index 86be2a78fd..6d5adb67ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -174,9 +174,9 @@ checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" [[package]] name = "cc" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" [[package]] name = "cfg-if" @@ -221,9 +221,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.4" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" dependencies = [ "clap_builder", "clap_derive", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.2" +version = "4.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" dependencies = [ "anstream", "anstyle", @@ -244,18 +244,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.2" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79504325bf38b10165b02e89b4347300f855f273c4cb30c4a3209e6583275e" +checksum = "d2020fa13af48afc65a9a87335bda648309ab3d154cd03c7ff95b378c7ed39c4" dependencies = [ - "clap 4.5.4", + "clap 4.5.7", ] [[package]] name = "clap_derive" -version = "4.5.4" +version = "4.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -265,17 +265,17 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "clap_mangen" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dd95b5ebb5c1c54581dd6346f3ed6a79a3eef95dd372fc2ac13d535535300e" +checksum = "74b70fc13e60c0e1d490dc50eb73a749be6d81f4ef03783df1d9b7b0c62bc937" dependencies = [ - "clap 4.5.4", + "clap 4.5.7", "roff", ] @@ -600,13 +600,13 @@ dependencies = [ [[package]] name = "just" -version = "1.28.0" +version = "1.29.0" dependencies = [ "ansi_term", "blake3", "camino", "chrono", - "clap 4.5.4", + "clap 4.5.7", "clap_complete", "clap_mangen", "cradle", @@ -685,9 +685,9 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -898,13 +898,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.6", + "regex-automata 0.4.7", "regex-syntax", ] @@ -916,9 +916,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -927,9 +927,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "roff" @@ -1244,9 +1244,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" diff --git a/Cargo.toml b/Cargo.toml index f497cc82ec..ca5170de16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "1.28.0" +version = "1.29.0" authors = ["Casey Rodarmor "] autotests = false categories = ["command-line-utilities", "development-tools"] diff --git a/README.md b/README.md index 41adab6786..5253c8e197 100644 --- a/README.md +++ b/README.md @@ -997,7 +997,7 @@ $ just test foo "bar baz" ``` Positional arguments may also be turned on on a per-recipe basis with the -`[positional-arguments]` attributemaster: +`[positional-arguments]` attribute1.29.0: ```just [positional-arguments] @@ -1701,7 +1701,7 @@ Recipes may be annotated with attributes that change their behavior. | `[no-cd]`1.9.0 | Don't change directory before executing recipe. | | `[no-exit-message]`1.7.0 | Don't print an error message if recipe fails. | | `[no-quiet]`1.23.0 | Override globally quiet recipes and always echo out the recipe. | -| `[positional-arguments]`master | Turn on [positional arguments](#positional-arguments) for this recipe. | +| `[positional-arguments]`1.29.0 | Turn on [positional arguments](#positional-arguments) for this recipe. | | `[private]`1.10.0 | See [Private Recipes](#private-recipes). | | `[unix]`1.8.0 | Enable recipe on Unixes. (Includes MacOS). | | `[windows]`1.8.0 | Enable recipe on Windows. | @@ -2075,7 +2075,7 @@ a $A $B=`echo $A`: When [export](#export) is set, all `just` variables are exported as environment variables. -#### Unexporting Environment Variablesmaster +#### Unexporting Environment Variables1.29.0 Environment variables can be unexported with the `unexport keyword`: diff --git a/src/completions.rs b/src/completions.rs index 3d23d5f6aa..439a172591 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -137,7 +137,7 @@ complete -c just -a '(__fish_just_complete_recipes)' const ZSH_COMPLETION_REPLACEMENTS: &[(&str, &str)] = &[ ( - r#" _arguments "${_arguments_options[@]}" \"#, + r#" _arguments "${_arguments_options[@]}" : \"#, r" local common=(", ), ( diff --git a/tests/completions.rs b/tests/completions.rs index 9de2787c39..9380223e58 100644 --- a/tests/completions.rs +++ b/tests/completions.rs @@ -33,6 +33,10 @@ fn replacements() { .args(["--completions", shell]) .output() .unwrap(); - assert!(output.status.success()); + assert!( + output.status.success(), + "shell completion generation for {shell} failed: {}", + output.status + ); } } From dd9792571b2b99bc861c21a7d0706a83e5652a44 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 12:39:34 -0700 Subject: [PATCH 09/26] Fix unexport syntax conflicts (#2158) --- src/parser.rs | 6 +++++- tests/unexport.rs | 24 +++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 3e4bb022c8..9ea372c92a 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -340,9 +340,13 @@ impl<'run, 'src> Parser<'run, 'src> { self.presume_keyword(Keyword::Export)?; items.push(Item::Assignment(self.parse_assignment(true)?)); } - Some(Keyword::Unexport) => { + Some(Keyword::Unexport) + if self.next_are(&[Identifier, Identifier, Eof]) + || self.next_are(&[Identifier, Identifier, Eol]) => + { self.presume_keyword(Keyword::Unexport)?; let name = self.parse_name()?; + self.expect_eol()?; items.push(Item::Unexport { name }); } Some(Keyword::Import) diff --git a/tests/unexport.rs b/tests/unexport.rs index 9ca93e87e9..af46ea1edd 100644 --- a/tests/unexport.rs +++ b/tests/unexport.rs @@ -99,6 +99,28 @@ fn unexport_doesnt_override_local_recipe_export() { ) .args(["recipe", "value"]) .stdout("variable: value\n") - .status(0) + .run(); +} + +#[test] +fn unexport_does_not_conflict_with_recipe_syntax() { + Test::new() + .justfile( + " + unexport foo: + @echo {{foo}} + ", + ) + .args(["unexport", "bar"]) + .stdout("bar\n") + .run(); +} + +#[test] +fn unexport_does_not_conflict_with_assignment_syntax() { + Test::new() + .justfile("unexport := 'foo'") + .args(["--evaluate", "unexport"]) + .stdout("foo") .run(); } From 5f91b37c82e6a92df2575babcb17a6a8e9c505f7 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 12:44:52 -0700 Subject: [PATCH 10/26] Release 1.29.1 (#2159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump version: 1.29.0 → 1.29.1 - Update changelog - Update changelog contributor credits --- CHANGELOG.md | 6 ++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc5b6bf7c5..e232b69383 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +[1.29.1](https://github.com/casey/just/releases/tag/1.29.1) - 2024-06-14 +------------------------------------------------------------------------ + +### Fixed +- Fix unexport syntax conflicts ([#2158](https://github.com/casey/just/pull/2158)) + [1.29.0](https://github.com/casey/just/releases/tag/1.29.0) - 2024-06-13 ------------------------------------------------------------------------ diff --git a/Cargo.lock b/Cargo.lock index 6d5adb67ea..c2b3e75dfd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -600,7 +600,7 @@ dependencies = [ [[package]] name = "just" -version = "1.29.0" +version = "1.29.1" dependencies = [ "ansi_term", "blake3", diff --git a/Cargo.toml b/Cargo.toml index ca5170de16..cdb8779072 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "1.29.0" +version = "1.29.1" authors = ["Casey Rodarmor "] autotests = false categories = ["command-line-utilities", "development-tools"] From b05a75d1681baf5028cdb33ac96d738539480d7a Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 13:35:03 -0700 Subject: [PATCH 11/26] List groups in source order with `just --groups --unsorted` (#2160) --- README.md | 2 + src/assignment.rs | 2 +- src/ast.rs | 2 +- src/attribute.rs | 2 +- src/compile_error.rs | 2 +- src/condition.rs | 2 +- src/dependency.rs | 2 +- src/expression.rs | 2 +- src/justfile.rs | 36 +++++++++++----- src/output_error.rs | 2 +- src/parameter.rs | 2 +- src/recipe.rs | 2 +- src/set.rs | 2 +- src/setting.rs | 2 +- src/shell.rs | 2 +- src/subcommand.rs | 4 +- src/token_kind.rs | 2 +- src/unresolved_dependency.rs | 2 +- tests/groups.rs | 83 ++++++++++++++++++++++++++++++++++-- 19 files changed, 124 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 5253c8e197..d369682007 100644 --- a/README.md +++ b/README.md @@ -1861,6 +1861,8 @@ Recipe groups: rust recipes ``` +Use `just --groups --unsorted` to print groups in their justfile order. + ### Command Evaluation Using Backticks Backticks can be used to store the result of commands: diff --git a/src/assignment.rs b/src/assignment.rs index 6dab1a96a6..eb50f510c4 100644 --- a/src/assignment.rs +++ b/src/assignment.rs @@ -4,7 +4,7 @@ use super::*; pub(crate) type Assignment<'src> = Binding<'src, Expression<'src>>; impl<'src> Display for Assignment<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { if self.export { write!(f, "export ")?; } diff --git a/src/ast.rs b/src/ast.rs index 18c3e451e7..f2e01228c0 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -12,7 +12,7 @@ pub(crate) struct Ast<'src> { } impl<'src> Display for Ast<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { let mut iter = self.items.iter().peekable(); while let Some(item) = iter.next() { diff --git a/src/attribute.rs b/src/attribute.rs index 5e83891f23..5176364699 100644 --- a/src/attribute.rs +++ b/src/attribute.rs @@ -110,7 +110,7 @@ impl<'src> Attribute<'src> { } impl<'src> Display for Attribute<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{}", self.name())?; if let Some(argument) = self.argument() { write!(f, "({argument})")?; diff --git a/src/compile_error.rs b/src/compile_error.rs index b60835ccde..6d22704a33 100644 --- a/src/compile_error.rs +++ b/src/compile_error.rs @@ -28,7 +28,7 @@ fn capitalize(s: &str) -> String { } impl Display for CompileError<'_> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { use CompileErrorKind::*; match &*self.kind { diff --git a/src/condition.rs b/src/condition.rs index a103a2ac7a..8c2a8add96 100644 --- a/src/condition.rs +++ b/src/condition.rs @@ -8,7 +8,7 @@ pub(crate) struct Condition<'src> { } impl<'src> Display for Condition<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "{} {} {}", self.lhs, self.operator, self.rhs) } } diff --git a/src/dependency.rs b/src/dependency.rs index 2d1da1173d..5f6dce589c 100644 --- a/src/dependency.rs +++ b/src/dependency.rs @@ -8,7 +8,7 @@ pub(crate) struct Dependency<'src> { } impl<'src> Display for Dependency<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { if self.arguments.is_empty() { write!(f, "{}", self.recipe.name()) } else { diff --git a/src/expression.rs b/src/expression.rs index 202fafe0f3..c1e4b5e015 100644 --- a/src/expression.rs +++ b/src/expression.rs @@ -51,7 +51,7 @@ impl<'src> Expression<'src> { } impl<'src> Display for Expression<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { match self { Self::Assert { condition, error } => write!(f, "assert({condition}, {error})"), Self::Backtick { token, .. } => write!(f, "{}", token.lexeme()), diff --git a/src/justfile.rs b/src/justfile.rs index e108eb91a8..77e089c565 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -365,13 +365,13 @@ impl<'src> Justfile<'src> { modules } - pub(crate) fn public_recipes(&self, config: &Config) -> Vec<&Recipe<'src, Dependency>> { + pub(crate) fn public_recipes(&self, config: &Config) -> Vec<&Recipe> { let mut recipes = self .recipes .values() .map(AsRef::as_ref) .filter(|recipe| recipe.is_public()) - .collect::>>(); + .collect::>(); if config.unsorted { recipes.sort_by_key(|recipe| (&recipe.import_offsets, recipe.name.offset)); @@ -380,19 +380,33 @@ impl<'src> Justfile<'src> { recipes } - pub(crate) fn public_groups(&self) -> BTreeSet { - self - .recipes - .values() - .map(AsRef::as_ref) - .filter(|recipe| recipe.is_public()) - .flat_map(Recipe::groups) - .collect() + pub(crate) fn public_groups(&self, config: &Config) -> Vec { + let mut groups = Vec::new(); + + for recipe in self.recipes.values() { + if recipe.is_public() { + for group in recipe.groups() { + groups.push((&recipe.import_offsets, recipe.name.offset, group)); + } + } + } + + if config.unsorted { + groups.sort(); + } else { + groups.sort_by(|(_, _, a), (_, _, b)| a.cmp(b)); + } + + let mut seen = HashSet::new(); + + groups.retain(|(_, _, group)| seen.insert(group.clone())); + + groups.into_iter().map(|(_, _, group)| group).collect() } } impl<'src> ColorDisplay for Justfile<'src> { - fn fmt(&self, f: &mut Formatter, color: Color) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter, color: Color) -> fmt::Result { let mut items = self.recipes.len() + self.assignments.len() + self.aliases.len(); for (name, assignment) in &self.assignments { if assignment.export { diff --git a/src/output_error.rs b/src/output_error.rs index 797d3a11e6..b1a165583b 100644 --- a/src/output_error.rs +++ b/src/output_error.rs @@ -15,7 +15,7 @@ pub(crate) enum OutputError { } impl Display for OutputError { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { match *self { Self::Code(code) => write!(f, "Process exited with status code {code}"), Self::Io(ref io_error) => write!(f, "Error executing process: {io_error}"), diff --git a/src/parameter.rs b/src/parameter.rs index e065534a2f..359e15d180 100644 --- a/src/parameter.rs +++ b/src/parameter.rs @@ -14,7 +14,7 @@ pub(crate) struct Parameter<'src> { } impl<'src> ColorDisplay for Parameter<'src> { - fn fmt(&self, f: &mut Formatter, color: Color) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter, color: Color) -> fmt::Result { if let Some(prefix) = self.kind.prefix() { write!(f, "{}", color.annotation().paint(prefix))?; } diff --git a/src/recipe.rs b/src/recipe.rs index e27cc2e034..a41ce93559 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -476,7 +476,7 @@ impl<'src, D> Recipe<'src, D> { } impl<'src, D: Display> ColorDisplay for Recipe<'src, D> { - fn fmt(&self, f: &mut Formatter, color: Color) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter, color: Color) -> fmt::Result { if let Some(doc) = self.doc { writeln!(f, "# {doc}")?; } diff --git a/src/set.rs b/src/set.rs index 45e5808faf..5958578652 100644 --- a/src/set.rs +++ b/src/set.rs @@ -13,7 +13,7 @@ impl<'src> Keyed<'src> for Set<'src> { } impl<'src> Display for Set<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "set {} := {}", self.name, self.value) } } diff --git a/src/setting.rs b/src/setting.rs index 8bf98f25ea..e6cb515565 100644 --- a/src/setting.rs +++ b/src/setting.rs @@ -20,7 +20,7 @@ pub(crate) enum Setting<'src> { } impl<'src> Display for Setting<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { match self { Self::AllowDuplicateRecipes(value) | Self::AllowDuplicateVariables(value) diff --git a/src/shell.rs b/src/shell.rs index e6430f610a..f637a7e7f3 100644 --- a/src/shell.rs +++ b/src/shell.rs @@ -7,7 +7,7 @@ pub(crate) struct Shell<'src> { } impl<'src> Display for Shell<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { write!(f, "[{}", self.command)?; for argument in &self.arguments { diff --git a/src/subcommand.rs b/src/subcommand.rs index 68b31095c6..a595249ae8 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -97,7 +97,7 @@ impl Subcommand { fn groups(config: &Config, justfile: &Justfile) { println!("Recipe groups:"); - for group in justfile.public_groups() { + for group in justfile.public_groups(config) { println!("{}{group}", config.list_prefix); } } @@ -215,7 +215,7 @@ impl Subcommand { overrides: &BTreeMap, chooser: Option<&str>, ) -> Result<(), Error<'src>> { - let mut recipes = Vec::<&Recipe>::new(); + let mut recipes = Vec::<&Recipe>::new(); let mut stack = vec![justfile]; while let Some(module) = stack.pop() { recipes.extend( diff --git a/src/token_kind.rs b/src/token_kind.rs index bb9158990f..0db15d2dfa 100644 --- a/src/token_kind.rs +++ b/src/token_kind.rs @@ -39,7 +39,7 @@ pub(crate) enum TokenKind { } impl Display for TokenKind { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { use TokenKind::*; write!( f, diff --git a/src/unresolved_dependency.rs b/src/unresolved_dependency.rs index 97f69d6510..3ea49a7cc3 100644 --- a/src/unresolved_dependency.rs +++ b/src/unresolved_dependency.rs @@ -7,7 +7,7 @@ pub(crate) struct UnresolvedDependency<'src> { } impl<'src> Display for UnresolvedDependency<'src> { - fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { if self.arguments.is_empty() { write!(f, "{}", self.recipe) } else { diff --git a/tests/groups.rs b/tests/groups.rs index 58343331dc..0812852ed4 100644 --- a/tests/groups.rs +++ b/tests/groups.rs @@ -157,12 +157,89 @@ fn list_groups_with_shorthand_syntax() { bar: ", ) - .args(["--groups", "--list-prefix", "..."]) + .arg("--groups") .stdout( " Recipe groups: - ...A - ...B + A + B + ", + ) + .run(); +} + +#[test] +fn list_groups_unsorted() { + Test::new() + .justfile( + " + [group: 'Z'] + baz: + + [group: 'B'] + foo: + + [group: 'A', group: 'B'] + bar: + ", + ) + .args(["--groups", "--unsorted"]) + .stdout( + " + Recipe groups: + Z + B + A + ", + ) + .run(); +} + +#[test] +fn list_groups_private_unsorted() { + Test::new() + .justfile( + " + [private] + [group: 'A'] + foo: + + [group: 'B'] + bar: + + [group: 'A'] + baz: + ", + ) + .args(["--groups", "--unsorted"]) + .stdout( + " + Recipe groups: + B + A + ", + ) + .run(); +} + +#[test] +fn list_groups_private() { + Test::new() + .justfile( + " + [private] + [group: 'A'] + foo: + + [group: 'B'] + bar: + ", + ) + .args(["--groups", "--unsorted"]) + .stdout( + " + Recipe groups: + B ", ) .run(); From 1547af08b5348bc7531332404862d40f25feac3f Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 16:11:22 -0700 Subject: [PATCH 12/26] Allow setting more command-line options with environment variables (#2161) --- src/config.rs | 253 ++++++++++++++++++++------------------ src/function.rs | 141 ++++++++++----------- src/lib.rs | 9 +- src/platform.rs | 8 +- src/platform_interface.rs | 4 +- src/subcommand.rs | 26 ++-- src/summary.rs | 2 +- src/thunk.rs | 14 +-- 8 files changed, 231 insertions(+), 226 deletions(-) diff --git a/src/config.rs b/src/config.rs index 34b72f3830..0e8f3d49e8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -7,10 +7,6 @@ use { }, }; -const CHOOSE_HELP: &str = "Select one or more recipes to run using a binary chooser. \ - If `--chooser` is not passed the chooser defaults to the \ - value of $JUST_CHOOSER, falling back to `fzf`"; - #[derive(Debug, PartialEq)] pub(crate) struct Config { pub(crate) check: bool, @@ -154,17 +150,20 @@ impl Config { .trailing_var_arg(true) .styles( Styles::styled() - .header(AnsiColor::Yellow.on_default()) - .usage(AnsiColor::Yellow.on_default()) - .literal(AnsiColor::Green.on_default()) - .placeholder(AnsiColor::Green.on_default()) + .header(AnsiColor::Yellow.on_default()) + .literal(AnsiColor::Green.on_default()) + .placeholder(AnsiColor::Green.on_default()) + .usage(AnsiColor::Yellow.on_default()), ) .arg( Arg::new(arg::CHECK) .long("check") .action(ArgAction::SetTrue) .requires(cmd::FORMAT) - .help("Run `--fmt` in 'check' mode. Exits with 0 if justfile is formatted correctly. Exits with 1 and prints a diff if formatting is required."), + .help( + "Run `--fmt` in 'check' mode. Exits with 0 if justfile is formatted correctly. \ + Exits with 1 and prints a diff if formatting is required.", + ), ) .arg( Arg::new(arg::CHOOSER) @@ -173,6 +172,13 @@ impl Config { .action(ArgAction::Set) .help("Override binary invoked by `--choose`"), ) + .arg( + Arg::new(arg::CLEAR_SHELL_ARGS) + .long("clear-shell-args") + .action(ArgAction::SetTrue) + .overrides_with(arg::SHELL_ARG) + .help("Clear shell arguments"), + ) .arg( Arg::new(arg::COLOR) .long("color") @@ -190,7 +196,21 @@ impl Config { .value_parser(PossibleValuesParser::new(arg::COMMAND_COLOR_VALUES)) .help("Echo recipe lines in "), ) - .arg(Arg::new(arg::YES).long("yes").action(ArgAction::SetTrue).help("Automatically confirm all recipes.")) + .arg( + Arg::new(arg::DOTENV_FILENAME) + .long("dotenv-filename") + .action(ArgAction::Set) + .help("Search for environment file named instead of `.env`") + .conflicts_with(arg::DOTENV_PATH), + ) + .arg( + Arg::new(arg::DOTENV_PATH) + .short('E') + .long("dotenv-path") + .action(ArgAction::Set) + .value_parser(value_parser!(PathBuf)) + .help("Load as environment file instead of searching for one"), + ) .arg( Arg::new(arg::DRY_RUN) .short('n') @@ -203,22 +223,43 @@ impl Config { .arg( Arg::new(arg::DUMP_FORMAT) .long("dump-format") + .env("JUST_DUMP_FORMAT") .action(ArgAction::Set) .value_parser(PossibleValuesParser::new(arg::DUMP_FORMAT_VALUES)) .default_value(arg::DUMP_FORMAT_JUST) .value_name("FORMAT") .help("Dump justfile as "), ) + .arg( + Arg::new(arg::GLOBAL_JUSTFILE) + .action(ArgAction::SetTrue) + .long("global-justfile") + .short('g') + .conflicts_with(arg::JUSTFILE) + .conflicts_with(arg::WORKING_DIRECTORY) + .help("Use global justfile"), + ) .arg( Arg::new(arg::HIGHLIGHT) .long("highlight") + .env("JUST_HIGHLIGHT") .action(ArgAction::SetTrue) .help("Highlight echoed recipe lines in bold") .overrides_with(arg::NO_HIGHLIGHT), ) + .arg( + Arg::new(arg::JUSTFILE) + .short('f') + .long("justfile") + .env("JUST_JUSTFILE") + .action(ArgAction::Set) + .value_parser(value_parser!(PathBuf)) + .help("Use as justfile"), + ) .arg( Arg::new(arg::LIST_HEADING) .long("list-heading") + .env("JUST_LIST_HEADING") .help("Print before list") .value_name("TEXT") .action(ArgAction::Set), @@ -226,6 +267,7 @@ impl Config { .arg( Arg::new(arg::LIST_PREFIX) .long("list-prefix") + .env("JUST_LIST_PREFIX") .help("Print before each list item") .value_name("TEXT") .action(ArgAction::Set), @@ -233,6 +275,7 @@ impl Config { .arg( Arg::new(arg::LIST_SUBMODULES) .long("list-submodules") + .env("JUST_LIST_SUBMODULES") .help("List recipes in submodules") .action(ArgAction::SetTrue) .env("JUST_LIST_SUBMODULES"), @@ -240,38 +283,33 @@ impl Config { .arg( Arg::new(arg::NO_ALIASES) .long("no-aliases") + .env("JUST_NO_ALIASES") .action(ArgAction::SetTrue) .help("Don't show aliases in list"), ) - .arg ( + .arg( Arg::new(arg::NO_DEPS) .long("no-deps") + .env("JUST_NO_DEPS") .alias("no-dependencies") .action(ArgAction::SetTrue) - .help("Don't run recipe dependencies") + .help("Don't run recipe dependencies"), ) .arg( Arg::new(arg::NO_DOTENV) .long("no-dotenv") + .env("JUST_NO_DOTENV") .action(ArgAction::SetTrue) .help("Don't load `.env` file"), ) .arg( Arg::new(arg::NO_HIGHLIGHT) .long("no-highlight") + .env("JUST_NO_HIGHLIGHT") .action(ArgAction::SetTrue) .help("Don't highlight echoed recipe lines in bold") .overrides_with(arg::HIGHLIGHT), ) - .arg( - Arg::new(arg::JUSTFILE) - .short('f') - .long("justfile") - .env("JUST_JUSTFILE") - .action(ArgAction::Set) - .value_parser(value_parser!(PathBuf)) - .help("Use as justfile"), - ) .arg( Arg::new(arg::QUIET) .short('q') @@ -311,15 +349,24 @@ impl Config { .help("Invoke with the shell used to run recipe lines and backticks"), ) .arg( - Arg::new(arg::CLEAR_SHELL_ARGS) - .long("clear-shell-args") + Arg::new(arg::TIMESTAMP) .action(ArgAction::SetTrue) - .overrides_with(arg::SHELL_ARG) - .help("Clear shell arguments"), + .long("timestamp") + .env("JUST_TIMESTAMP") + .help("Print recipe command timestamps"), + ) + .arg( + Arg::new(arg::TIMESTAMP_FORMAT) + .action(ArgAction::Set) + .long("timestamp-format") + .env("JUST_TIMESTAMP_FORMAT") + .default_value("%H:%M:%S") + .help("Timestamp format string"), ) .arg( Arg::new(arg::UNSORTED) .long("unsorted") + .env("JUST_UNSORTED") .short('u') .action(ArgAction::SetTrue) .help("Return list and summary entries in source order"), @@ -350,13 +397,28 @@ impl Config { .help("Use as working directory. --justfile must also be set") .requires(arg::JUSTFILE), ) + .arg( + Arg::new(arg::YES) + .long("yes") + .env("JUST_YES") + .action(ArgAction::SetTrue) + .help("Automatically confirm all recipes."), + ) .arg( Arg::new(cmd::CHANGELOG) .long("changelog") .action(ArgAction::SetTrue) .help("Print changelog"), ) - .arg(Arg::new(cmd::CHOOSE).long("choose").action(ArgAction::SetTrue).help(CHOOSE_HELP)) + .arg( + Arg::new(cmd::CHOOSE) + .long("choose") + .action(ArgAction::SetTrue) + .help( + "Select one or more recipes to run using a binary chooser. If `--chooser` is not \ + passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`", + ), + ) .arg( Arg::new(cmd::COMMAND) .long("command") @@ -395,6 +457,7 @@ impl Config { .arg( Arg::new(cmd::EVALUATE) .long("evaluate") + .alias("eval") .action(ArgAction::SetTrue) .help( "Evaluate and print all variables. If a variable name is given as an argument, only \ @@ -408,6 +471,12 @@ impl Config { .action(ArgAction::SetTrue) .help("Format and overwrite justfile"), ) + .arg( + Arg::new(cmd::GROUPS) + .long("groups") + .action(ArgAction::SetTrue) + .help("List recipe groups"), + ) .arg( Arg::new(cmd::INIT) .long("init") @@ -425,12 +494,6 @@ impl Config { .conflicts_with(arg::ARGUMENTS) .help("List available recipes"), ) - .arg( - Arg::new(cmd::GROUPS) - .long("groups") - .action(ArgAction::SetTrue) - .help("List recipe groups") - ) .arg( Arg::new(cmd::MAN) .long("man") @@ -459,21 +522,6 @@ impl Config { .action(ArgAction::SetTrue) .help("List names of variables"), ) - .arg( - Arg::new(arg::DOTENV_FILENAME) - .long("dotenv-filename") - .action(ArgAction::Set) - .help("Search for environment file named instead of `.env`") - .conflicts_with(arg::DOTENV_PATH), - ) - .arg( - Arg::new(arg::DOTENV_PATH) - .short('E') - .long("dotenv-path") - .action(ArgAction::Set) - .value_parser(value_parser!(PathBuf)) - .help("Load as environment file instead of searching for one") - ) .group(ArgGroup::new("SUBCOMMAND").args(cmd::ALL)) .arg( Arg::new(arg::ARGUMENTS) @@ -481,30 +529,6 @@ impl Config { .action(ArgAction::Append) .help("Overrides and recipe(s) to run, defaulting to the first recipe in the justfile"), ) - .arg( - Arg::new(arg::GLOBAL_JUSTFILE) - .action(ArgAction::SetTrue) - .long("global-justfile") - .short('g') - .conflicts_with(arg::JUSTFILE) - .conflicts_with(arg::WORKING_DIRECTORY) - .help("Use global justfile") - ) - .arg( - Arg::new(arg::TIMESTAMP) - .action(ArgAction::SetTrue) - .long("timestamp") - .env("JUST_TIMESTAMP") - .help("Print recipe command timestamps") - ) - .arg( - Arg::new(arg::TIMESTAMP_FORMAT) - .action(ArgAction::Set) - .long("timestamp-format") - .env("JUST_TIMESTAMP_FORMAT") - .default_value("%H:%M:%S") - .help("Timestamp format string") - ) } fn color_from_matches(matches: &ArgMatches) -> ConfigResult { @@ -611,17 +635,6 @@ impl Config { } pub(crate) fn from_matches(matches: &ArgMatches) -> ConfigResult { - let invocation_directory = env::current_dir().context(config_error::CurrentDirContext)?; - - let verbosity = if matches.get_flag(arg::QUIET) { - Verbosity::Quiet - } else { - Verbosity::from_flag_occurrences(matches.get_count(arg::VERBOSE)) - }; - - let color = Self::color_from_matches(matches)?; - let command_color = Self::command_color_from_matches(matches)?; - let mut overrides = BTreeMap::new(); if let Some(mut values) = matches.get_many::(arg::SET) { while let (Some(k), Some(v)) = (values.next(), values.next()) { @@ -684,28 +697,10 @@ impl Config { } } else if let Some(&shell) = matches.get_one::(cmd::COMPLETIONS) { Subcommand::Completions { shell } - } else if matches.get_flag(cmd::EDIT) { - Subcommand::Edit - } else if matches.get_flag(cmd::SUMMARY) { - Subcommand::Summary } else if matches.get_flag(cmd::DUMP) { Subcommand::Dump - } else if matches.get_flag(cmd::FORMAT) { - Subcommand::Format - } else if matches.get_flag(cmd::INIT) { - Subcommand::Init - } else if let Some(path) = matches.get_many::(cmd::LIST) { - Subcommand::List { - path: Self::parse_module_path(path)?, - } - } else if matches.get_flag(cmd::GROUPS) { - Subcommand::Groups - } else if matches.get_flag(cmd::MAN) { - Subcommand::Man - } else if let Some(path) = matches.get_many::(cmd::SHOW) { - Subcommand::Show { - path: Self::parse_module_path(path)?, - } + } else if matches.get_flag(cmd::EDIT) { + Subcommand::Edit } else if matches.get_flag(cmd::EVALUATE) { if positional.arguments.len() > 1 { return Err(ConfigError::SubcommandArguments { @@ -722,6 +717,24 @@ impl Config { variable: positional.arguments.into_iter().next(), overrides, } + } else if matches.get_flag(cmd::FORMAT) { + Subcommand::Format + } else if matches.get_flag(cmd::GROUPS) { + Subcommand::Groups + } else if matches.get_flag(cmd::INIT) { + Subcommand::Init + } else if let Some(path) = matches.get_many::(cmd::LIST) { + Subcommand::List { + path: Self::parse_module_path(path)?, + } + } else if matches.get_flag(cmd::MAN) { + Subcommand::Man + } else if let Some(path) = matches.get_many::(cmd::SHOW) { + Subcommand::Show { + path: Self::parse_module_path(path)?, + } + } else if matches.get_flag(cmd::SUMMARY) { + Subcommand::Summary } else if matches.get_flag(cmd::VARIABLES) { Subcommand::Variables } else { @@ -731,20 +744,10 @@ impl Config { } }; - let shell_args = if matches.get_flag(arg::CLEAR_SHELL_ARGS) { - Some(Vec::new()) - } else { - matches - .get_many::(arg::SHELL_ARG) - .map(|s| s.map(Into::into).collect()) - }; - - let unstable = matches.get_flag(arg::UNSTABLE); - Ok(Self { check: matches.get_flag(arg::CHECK), - color, - command_color, + color: Self::color_from_matches(matches)?, + command_color: Self::command_color_from_matches(matches)?, dotenv_filename: matches .get_one::(arg::DOTENV_FILENAME) .map(Into::into), @@ -752,7 +755,7 @@ impl Config { dry_run: matches.get_flag(arg::DRY_RUN), dump_format: Self::dump_format_from_matches(matches)?, highlight: !matches.get_flag(arg::NO_HIGHLIGHT), - invocation_directory, + invocation_directory: env::current_dir().context(config_error::CurrentDirContext)?, list_heading: matches .get_one::(arg::LIST_HEADING) .map_or_else(|| "Available recipes:\n".into(), Into::into), @@ -765,7 +768,13 @@ impl Config { no_dependencies: matches.get_flag(arg::NO_DEPS), search_config, shell: matches.get_one::(arg::SHELL).map(Into::into), - shell_args, + shell_args: if matches.get_flag(arg::CLEAR_SHELL_ARGS) { + Some(Vec::new()) + } else { + matches + .get_many::(arg::SHELL_ARG) + .map(|s| s.map(Into::into).collect()) + }, shell_command: matches.get_flag(arg::SHELL_COMMAND), subcommand, timestamp: matches.get_flag(arg::TIMESTAMP), @@ -774,13 +783,17 @@ impl Config { .unwrap() .into(), unsorted: matches.get_flag(arg::UNSORTED), - unstable, - verbosity, + unstable: matches.get_flag(arg::UNSTABLE), + verbosity: if matches.get_flag(arg::QUIET) { + Verbosity::Quiet + } else { + Verbosity::from_flag_occurrences(matches.get_count(arg::VERBOSE)) + }, yes: matches.get_flag(arg::YES), }) } - pub(crate) fn require_unstable(&self, message: &str) -> Result<(), Error<'static>> { + pub(crate) fn require_unstable(&self, message: &str) -> RunResult<'static> { if self.unstable { Ok(()) } else { @@ -790,7 +803,7 @@ impl Config { } } - pub(crate) fn run(self, loader: &Loader) -> Result<(), Error> { + pub(crate) fn run(self, loader: &Loader) -> RunResult { if let Err(error) = InterruptHandler::install(self.verbosity) { warn!("Failed to set CTRL-C handler: {error}"); } diff --git a/src/function.rs b/src/function.rs index 206faf8c5a..922676228e 100644 --- a/src/function.rs +++ b/src/function.rs @@ -11,13 +11,13 @@ use { }; pub(crate) enum Function { - Nullary(fn(Context) -> Result), - Unary(fn(Context, &str) -> Result), - UnaryOpt(fn(Context, &str, Option<&str>) -> Result), - UnaryPlus(fn(Context, &str, &[String]) -> Result), - Binary(fn(Context, &str, &str) -> Result), - BinaryPlus(fn(Context, &str, &str, &[String]) -> Result), - Ternary(fn(Context, &str, &str, &str) -> Result), + Nullary(fn(Context) -> FunctionResult), + Unary(fn(Context, &str) -> FunctionResult), + UnaryOpt(fn(Context, &str, Option<&str>) -> FunctionResult), + UnaryPlus(fn(Context, &str, &[String]) -> FunctionResult), + Binary(fn(Context, &str, &str) -> FunctionResult), + BinaryPlus(fn(Context, &str, &str, &[String]) -> FunctionResult), + Ternary(fn(Context, &str, &str, &str) -> FunctionResult), } pub(crate) struct Context<'src: 'run, 'run> { @@ -119,7 +119,7 @@ impl Function { } } -fn absolute_path(context: Context, path: &str) -> Result { +fn absolute_path(context: Context, path: &str) -> FunctionResult { let abs_path_unchecked = context .evaluator .context @@ -136,7 +136,7 @@ fn absolute_path(context: Context, path: &str) -> Result { } } -fn append(_context: Context, suffix: &str, s: &str) -> Result { +fn append(_context: Context, suffix: &str, s: &str) -> FunctionResult { Ok( s.split_whitespace() .map(|s| format!("{s}{suffix}")) @@ -145,15 +145,15 @@ fn append(_context: Context, suffix: &str, s: &str) -> Result { ) } -fn arch(_context: Context) -> Result { +fn arch(_context: Context) -> FunctionResult { Ok(target::arch().to_owned()) } -fn blake3(_context: Context, s: &str) -> Result { +fn blake3(_context: Context, s: &str) -> FunctionResult { Ok(blake3::hash(s.as_bytes()).to_string()) } -fn blake3_file(context: Context, path: &str) -> Result { +fn blake3_file(context: Context, path: &str) -> FunctionResult { let path = context .evaluator .context @@ -167,7 +167,7 @@ fn blake3_file(context: Context, path: &str) -> Result { Ok(hasher.finalize().to_string()) } -fn canonicalize(_context: Context, path: &str) -> Result { +fn canonicalize(_context: Context, path: &str) -> FunctionResult { let canonical = std::fs::canonicalize(path).map_err(|err| format!("I/O error canonicalizing path: {err}"))?; @@ -179,7 +179,7 @@ fn canonicalize(_context: Context, path: &str) -> Result { }) } -fn capitalize(_context: Context, s: &str) -> Result { +fn capitalize(_context: Context, s: &str) -> FunctionResult { let mut capitalized = String::new(); for (i, c) in s.chars().enumerate() { if i == 0 { @@ -191,7 +191,7 @@ fn capitalize(_context: Context, s: &str) -> Result { Ok(capitalized) } -fn choose(_context: Context, n: &str, alphabet: &str) -> Result { +fn choose(_context: Context, n: &str, alphabet: &str) -> FunctionResult { if alphabet.is_empty() { return Err("empty alphabet".into()); } @@ -215,11 +215,11 @@ fn choose(_context: Context, n: &str, alphabet: &str) -> Result Ok((0..n).map(|_| alphabet.choose(&mut rng).unwrap()).collect()) } -fn clean(_context: Context, path: &str) -> Result { +fn clean(_context: Context, path: &str) -> FunctionResult { Ok(Path::new(path).lexiclean().to_str().unwrap().to_owned()) } -fn dir(name: &'static str, f: fn() -> Option) -> Result { +fn dir(name: &'static str, f: fn() -> Option) -> FunctionResult { match f() { Some(path) => path .as_os_str() @@ -235,7 +235,7 @@ fn dir(name: &'static str, f: fn() -> Option) -> Result } } -fn encode_uri_component(_context: Context, s: &str) -> Result { +fn encode_uri_component(_context: Context, s: &str) -> FunctionResult { static PERCENT_ENCODE: percent_encoding::AsciiSet = percent_encoding::NON_ALPHANUMERIC .remove(b'-') .remove(b'_') @@ -249,7 +249,7 @@ fn encode_uri_component(_context: Context, s: &str) -> Result { Ok(percent_encoding::utf8_percent_encode(s, &PERCENT_ENCODE).to_string()) } -fn env_var(context: Context, key: &str) -> Result { +fn env_var(context: Context, key: &str) -> FunctionResult { use std::env::VarError::*; if let Some(value) = context.evaluator.context.dotenv.get(key) { @@ -265,7 +265,7 @@ fn env_var(context: Context, key: &str) -> Result { } } -fn env_var_or_default(context: Context, key: &str, default: &str) -> Result { +fn env_var_or_default(context: Context, key: &str, default: &str) -> FunctionResult { use std::env::VarError::*; if let Some(value) = context.evaluator.context.dotenv.get(key) { @@ -281,39 +281,39 @@ fn env_var_or_default(context: Context, key: &str, default: &str) -> Result) -> Result { +fn env(context: Context, key: &str, default: Option<&str>) -> FunctionResult { match default { Some(val) => env_var_or_default(context, key, val), None => env_var(context, key), } } -fn error(_context: Context, message: &str) -> Result { +fn error(_context: Context, message: &str) -> FunctionResult { Err(message.to_owned()) } -fn extension(_context: Context, path: &str) -> Result { +fn extension(_context: Context, path: &str) -> FunctionResult { Utf8Path::new(path) .extension() .map(str::to_owned) .ok_or_else(|| format!("Could not extract extension from `{path}`")) } -fn file_name(_context: Context, path: &str) -> Result { +fn file_name(_context: Context, path: &str) -> FunctionResult { Utf8Path::new(path) .file_name() .map(str::to_owned) .ok_or_else(|| format!("Could not extract file name from `{path}`")) } -fn file_stem(_context: Context, path: &str) -> Result { +fn file_stem(_context: Context, path: &str) -> FunctionResult { Utf8Path::new(path) .file_stem() .map(str::to_owned) .ok_or_else(|| format!("Could not extract file stem from `{path}`")) } -fn invocation_directory(context: Context) -> Result { +fn invocation_directory(context: Context) -> FunctionResult { Platform::convert_native_path( &context.evaluator.context.search.working_directory, &context.evaluator.context.config.invocation_directory, @@ -321,7 +321,7 @@ fn invocation_directory(context: Context) -> Result { .map_err(|e| format!("Error getting shell path: {e}")) } -fn invocation_directory_native(context: Context) -> Result { +fn invocation_directory_native(context: Context) -> FunctionResult { context .evaluator .context @@ -342,11 +342,11 @@ fn invocation_directory_native(context: Context) -> Result { }) } -fn is_dependency(context: Context) -> Result { +fn is_dependency(context: Context) -> FunctionResult { Ok(context.evaluator.is_dependency.to_string()) } -fn prepend(_context: Context, prefix: &str, s: &str) -> Result { +fn prepend(_context: Context, prefix: &str, s: &str) -> FunctionResult { Ok( s.split_whitespace() .map(|s| format!("{prefix}{s}")) @@ -355,7 +355,7 @@ fn prepend(_context: Context, prefix: &str, s: &str) -> Result { ) } -fn join(_context: Context, base: &str, with: &str, and: &[String]) -> Result { +fn join(_context: Context, base: &str, with: &str, and: &[String]) -> FunctionResult { let mut result = Utf8Path::new(base).join(with); for arg in and { result.push(arg); @@ -363,7 +363,7 @@ fn join(_context: Context, base: &str, with: &str, and: &[String]) -> Result Result { +fn just_executable(_context: Context) -> FunctionResult { let exe_path = env::current_exe().map_err(|e| format!("Error getting current executable: {e}"))?; @@ -375,11 +375,11 @@ fn just_executable(_context: Context) -> Result { }) } -fn just_pid(_context: Context) -> Result { +fn just_pid(_context: Context) -> FunctionResult { Ok(std::process::id().to_string()) } -fn justfile(context: Context) -> Result { +fn justfile(context: Context) -> FunctionResult { context .evaluator .context @@ -395,7 +395,7 @@ fn justfile(context: Context) -> Result { }) } -fn justfile_directory(context: Context) -> Result { +fn justfile_directory(context: Context) -> FunctionResult { let justfile_directory = context .evaluator .context @@ -420,19 +420,19 @@ fn justfile_directory(context: Context) -> Result { }) } -fn kebabcase(_context: Context, s: &str) -> Result { +fn kebabcase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_kebab_case()) } -fn lowercamelcase(_context: Context, s: &str) -> Result { +fn lowercamelcase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_lower_camel_case()) } -fn lowercase(_context: Context, s: &str) -> Result { +fn lowercase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_lowercase()) } -fn module_directory(context: Context) -> Result { +fn module_directory(context: Context) -> FunctionResult { context .evaluator .context @@ -459,7 +459,7 @@ fn module_directory(context: Context) -> Result { }) } -fn module_file(context: Context) -> Result { +fn module_file(context: Context) -> FunctionResult { context .evaluator .context @@ -478,27 +478,27 @@ fn module_file(context: Context) -> Result { }) } -fn num_cpus(_context: Context) -> Result { +fn num_cpus(_context: Context) -> FunctionResult { let num = num_cpus::get(); Ok(num.to_string()) } -fn os(_context: Context) -> Result { +fn os(_context: Context) -> FunctionResult { Ok(target::os().to_owned()) } -fn os_family(_context: Context) -> Result { +fn os_family(_context: Context) -> FunctionResult { Ok(target::family().to_owned()) } -fn parent_directory(_context: Context, path: &str) -> Result { +fn parent_directory(_context: Context, path: &str) -> FunctionResult { Utf8Path::new(path) .parent() .map(Utf8Path::to_string) .ok_or_else(|| format!("Could not extract parent directory from `{path}`")) } -fn path_exists(context: Context, path: &str) -> Result { +fn path_exists(context: Context, path: &str) -> FunctionResult { Ok( context .evaluator @@ -511,20 +511,15 @@ fn path_exists(context: Context, path: &str) -> Result { ) } -fn quote(_context: Context, s: &str) -> Result { +fn quote(_context: Context, s: &str) -> FunctionResult { Ok(format!("'{}'", s.replace('\'', "'\\''"))) } -fn replace(_context: Context, s: &str, from: &str, to: &str) -> Result { +fn replace(_context: Context, s: &str, from: &str, to: &str) -> FunctionResult { Ok(s.replace(from, to)) } -fn replace_regex( - _context: Context, - s: &str, - regex: &str, - replacement: &str, -) -> Result { +fn replace_regex(_context: Context, s: &str, regex: &str, replacement: &str) -> FunctionResult { Ok( Regex::new(regex) .map_err(|err| err.to_string())? @@ -533,7 +528,7 @@ fn replace_regex( ) } -fn sha256(_context: Context, s: &str) -> Result { +fn sha256(_context: Context, s: &str) -> FunctionResult { use sha2::{Digest, Sha256}; let mut hasher = Sha256::new(); hasher.update(s); @@ -541,7 +536,7 @@ fn sha256(_context: Context, s: &str) -> Result { Ok(format!("{hash:x}")) } -fn sha256_file(context: Context, path: &str) -> Result { +fn sha256_file(context: Context, path: &str) -> FunctionResult { use sha2::{Digest, Sha256}; let path = context .evaluator @@ -558,7 +553,7 @@ fn sha256_file(context: Context, path: &str) -> Result { Ok(format!("{hash:x}")) } -fn shell(context: Context, command: &str, args: &[String]) -> Result { +fn shell(context: Context, command: &str, args: &[String]) -> FunctionResult { let args = iter::once(command) .chain(args.iter().map(String::as_str)) .collect::>(); @@ -569,19 +564,19 @@ fn shell(context: Context, command: &str, args: &[String]) -> Result Result { +fn shoutykebabcase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_shouty_kebab_case()) } -fn shoutysnakecase(_context: Context, s: &str) -> Result { +fn shoutysnakecase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_shouty_snake_case()) } -fn snakecase(_context: Context, s: &str) -> Result { +fn snakecase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_snake_case()) } -fn source_directory(context: Context) -> Result { +fn source_directory(context: Context) -> FunctionResult { context .evaluator .context @@ -602,7 +597,7 @@ fn source_directory(context: Context) -> Result { }) } -fn source_file(context: Context) -> Result { +fn source_file(context: Context) -> FunctionResult { context .evaluator .context @@ -621,51 +616,51 @@ fn source_file(context: Context) -> Result { }) } -fn titlecase(_context: Context, s: &str) -> Result { +fn titlecase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_title_case()) } -fn trim(_context: Context, s: &str) -> Result { +fn trim(_context: Context, s: &str) -> FunctionResult { Ok(s.trim().to_owned()) } -fn trim_end(_context: Context, s: &str) -> Result { +fn trim_end(_context: Context, s: &str) -> FunctionResult { Ok(s.trim_end().to_owned()) } -fn trim_end_match(_context: Context, s: &str, pat: &str) -> Result { +fn trim_end_match(_context: Context, s: &str, pat: &str) -> FunctionResult { Ok(s.strip_suffix(pat).unwrap_or(s).to_owned()) } -fn trim_end_matches(_context: Context, s: &str, pat: &str) -> Result { +fn trim_end_matches(_context: Context, s: &str, pat: &str) -> FunctionResult { Ok(s.trim_end_matches(pat).to_owned()) } -fn trim_start(_context: Context, s: &str) -> Result { +fn trim_start(_context: Context, s: &str) -> FunctionResult { Ok(s.trim_start().to_owned()) } -fn trim_start_match(_context: Context, s: &str, pat: &str) -> Result { +fn trim_start_match(_context: Context, s: &str, pat: &str) -> FunctionResult { Ok(s.strip_prefix(pat).unwrap_or(s).to_owned()) } -fn trim_start_matches(_context: Context, s: &str, pat: &str) -> Result { +fn trim_start_matches(_context: Context, s: &str, pat: &str) -> FunctionResult { Ok(s.trim_start_matches(pat).to_owned()) } -fn uppercamelcase(_context: Context, s: &str) -> Result { +fn uppercamelcase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_upper_camel_case()) } -fn uppercase(_context: Context, s: &str) -> Result { +fn uppercase(_context: Context, s: &str) -> FunctionResult { Ok(s.to_uppercase()) } -fn uuid(_context: Context) -> Result { +fn uuid(_context: Context) -> FunctionResult { Ok(uuid::Uuid::new_v4().to_string()) } -fn without_extension(_context: Context, path: &str) -> Result { +fn without_extension(_context: Context, path: &str) -> FunctionResult { let parent = Utf8Path::new(path) .parent() .ok_or_else(|| format!("Could not extract parent from `{path}`"))?; @@ -679,7 +674,7 @@ fn without_extension(_context: Context, path: &str) -> Result { /// Check whether a string processes properly as semver (e.x. "0.1.0") /// and matches a given semver requirement (e.x. ">=0.1.0") -fn semver_matches(_context: Context, version: &str, requirement: &str) -> Result { +fn semver_matches(_context: Context, version: &str, requirement: &str) -> FunctionResult { Ok( requirement .parse::() diff --git a/src/lib.rs b/src/lib.rs index 5275cecf91..b5b17f4e65 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,10 +86,11 @@ pub use crate::run::run; #[doc(hidden)] pub use unindent::unindent; -pub(crate) type CompileResult<'a, T = ()> = Result>; -pub(crate) type ConfigResult = Result; -pub(crate) type RunResult<'a, T = ()> = Result>; -pub(crate) type SearchResult = Result; +type CompileResult<'a, T = ()> = Result>; +type ConfigResult = Result; +type FunctionResult = Result; +type RunResult<'a, T = ()> = Result>; +type SearchResult = Result; #[cfg(test)] #[macro_use] diff --git a/src/platform.rs b/src/platform.rs index 36be7fc743..01bf74b584 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -19,7 +19,7 @@ impl PlatformInterface for Platform { Ok(cmd) } - fn set_execute_permission(path: &Path) -> Result<(), io::Error> { + fn set_execute_permission(path: &Path) -> io::Result<()> { use std::os::unix::fs::PermissionsExt; // get current permissions @@ -38,7 +38,7 @@ impl PlatformInterface for Platform { exit_status.signal() } - fn convert_native_path(_working_directory: &Path, path: &Path) -> Result { + fn convert_native_path(_working_directory: &Path, path: &Path) -> FunctionResult { path .to_str() .map(str::to_string) @@ -85,7 +85,7 @@ impl PlatformInterface for Platform { Ok(cmd) } - fn set_execute_permission(_path: &Path) -> Result<(), io::Error> { + fn set_execute_permission(_path: &Path) -> io::Result<()> { // it is not necessary to set an execute permission on a script on windows, so // this is a nop Ok(()) @@ -97,7 +97,7 @@ impl PlatformInterface for Platform { None } - fn convert_native_path(working_directory: &Path, path: &Path) -> Result { + fn convert_native_path(working_directory: &Path, path: &Path) -> FunctionResult { // Translate path from windows style to unix style let mut cygpath = Command::new("cygpath"); cygpath.current_dir(working_directory); diff --git a/src/platform_interface.rs b/src/platform_interface.rs index 4a984ffb5d..463f6650a6 100644 --- a/src/platform_interface.rs +++ b/src/platform_interface.rs @@ -10,12 +10,12 @@ pub(crate) trait PlatformInterface { ) -> Result; /// Set the execute permission on the file pointed to by `path` - fn set_execute_permission(path: &Path) -> Result<(), io::Error>; + fn set_execute_permission(path: &Path) -> io::Result<()>; /// Extract the signal from a process exit status, if it was terminated by a /// signal fn signal_from_exit_status(exit_status: ExitStatus) -> Option; /// Translate a path from a "native" path to a path the interpreter expects - fn convert_native_path(working_directory: &Path, path: &Path) -> Result; + fn convert_native_path(working_directory: &Path, path: &Path) -> FunctionResult; } diff --git a/src/subcommand.rs b/src/subcommand.rs index a595249ae8..9b9a2463b0 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -42,11 +42,7 @@ pub(crate) enum Subcommand { } impl Subcommand { - pub(crate) fn execute<'src>( - &self, - config: &Config, - loader: &'src Loader, - ) -> Result<(), Error<'src>> { + pub(crate) fn execute<'src>(&self, config: &Config, loader: &'src Loader) -> RunResult<'src> { use Subcommand::*; match self { @@ -107,7 +103,7 @@ impl Subcommand { loader: &'src Loader, arguments: &[String], overrides: &BTreeMap, - ) -> Result<(), Error<'src>> { + ) -> RunResult<'src> { if matches!( config.search_config, SearchConfig::FromInvocationDirectory | SearchConfig::FromSearchDirectory { .. } @@ -192,7 +188,7 @@ impl Subcommand { config: &Config, loader: &'src Loader, search: &Search, - ) -> Result, Error<'src>> { + ) -> RunResult<'src, Compilation<'src>> { let compilation = Compiler::compile(config.unstable, loader, &search.justfile)?; if config.verbosity.loud() { @@ -214,7 +210,7 @@ impl Subcommand { search: &Search, overrides: &BTreeMap, chooser: Option<&str>, - ) -> Result<(), Error<'src>> { + ) -> RunResult<'src> { let mut recipes = Vec::<&Recipe>::new(); let mut stack = vec![justfile]; while let Some(module) = stack.pop() { @@ -304,7 +300,7 @@ impl Subcommand { Ok(()) } - fn dump(config: &Config, ast: &Ast, justfile: &Justfile) -> Result<(), Error<'static>> { + fn dump(config: &Config, ast: &Ast, justfile: &Justfile) -> RunResult<'static> { match config.dump_format { DumpFormat::Json => { serde_json::to_writer(io::stdout(), justfile) @@ -316,7 +312,7 @@ impl Subcommand { Ok(()) } - fn edit(search: &Search) -> Result<(), Error<'static>> { + fn edit(search: &Search) -> RunResult<'static> { let editor = env::var_os("VISUAL") .or_else(|| env::var_os("EDITOR")) .unwrap_or_else(|| "vim".into()); @@ -338,7 +334,7 @@ impl Subcommand { Ok(()) } - fn format(config: &Config, search: &Search, src: &str, ast: &Ast) -> Result<(), Error<'static>> { + fn format(config: &Config, search: &Search, src: &str, ast: &Ast) -> RunResult<'static> { config.require_unstable("The `--fmt` command is currently unstable.")?; let formatted = ast.to_string(); @@ -383,7 +379,7 @@ impl Subcommand { Ok(()) } - fn init(config: &Config) -> Result<(), Error<'static>> { + fn init(config: &Config) -> RunResult<'static> { let search = Search::init(&config.search_config, &config.invocation_directory)?; if search.justfile.is_file() { @@ -403,7 +399,7 @@ impl Subcommand { } } - fn man() -> Result<(), Error<'static>> { + fn man() -> RunResult<'static> { let mut buffer = Vec::::new(); Man::new(Config::app()) @@ -423,7 +419,7 @@ impl Subcommand { Ok(()) } - fn list(config: &Config, mut module: &Justfile, path: &ModulePath) -> Result<(), Error<'static>> { + fn list(config: &Config, mut module: &Justfile, path: &ModulePath) -> RunResult<'static> { for name in &path.path { module = module .modules @@ -585,7 +581,7 @@ impl Subcommand { config: &Config, mut module: &Justfile<'src>, path: &ModulePath, - ) -> Result<(), Error<'src>> { + ) -> RunResult<'src> { for name in &path.path[0..path.path.len() - 1] { module = module .modules diff --git a/src/summary.rs b/src/summary.rs index 472feb04fe..65a28ba1f9 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -25,7 +25,7 @@ mod full { }; } -pub fn summary(path: &Path) -> Result, io::Error> { +pub fn summary(path: &Path) -> io::Result> { let loader = Loader::new(); match Compiler::compile(false, &loader, path) { diff --git a/src/thunk.rs b/src/thunk.rs index 2ab203abb9..82668998a5 100644 --- a/src/thunk.rs +++ b/src/thunk.rs @@ -6,42 +6,42 @@ pub(crate) enum Thunk<'src> { Nullary { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context) -> Result, + function: fn(function::Context) -> FunctionResult, }, Unary { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context, &str) -> Result, + function: fn(function::Context, &str) -> FunctionResult, arg: Box>, }, UnaryOpt { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context, &str, Option<&str>) -> Result, + function: fn(function::Context, &str, Option<&str>) -> FunctionResult, args: (Box>, Box>>), }, UnaryPlus { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context, &str, &[String]) -> Result, + function: fn(function::Context, &str, &[String]) -> FunctionResult, args: (Box>, Vec>), }, Binary { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context, &str, &str) -> Result, + function: fn(function::Context, &str, &str) -> FunctionResult, args: [Box>; 2], }, BinaryPlus { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context, &str, &str, &[String]) -> Result, + function: fn(function::Context, &str, &str, &[String]) -> FunctionResult, args: ([Box>; 2], Vec>), }, Ternary { name: Name<'src>, #[derivative(Debug = "ignore", PartialEq = "ignore")] - function: fn(function::Context, &str, &str, &str) -> Result, + function: fn(function::Context, &str, &str, &str) -> FunctionResult, args: [Box>; 3], }, } From bf6ec6bf165a7eb4269b6f3b393e6bd09a596fcc Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 16:42:14 -0700 Subject: [PATCH 13/26] Credit myself in changelog (#2162) --- CHANGELOG.md | 938 ++++++++++++------------- crates/update-contributors/src/main.rs | 10 +- 2 files changed, 472 insertions(+), 476 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e232b69383..f104b083b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,121 +5,121 @@ Changelog ------------------------------------------------------------------------ ### Fixed -- Fix unexport syntax conflicts ([#2158](https://github.com/casey/just/pull/2158)) +- Fix unexport syntax conflicts ([#2158](https://github.com/casey/just/pull/2158) by [casey](https://github.com/casey)) [1.29.0](https://github.com/casey/just/releases/tag/1.29.0) - 2024-06-13 ------------------------------------------------------------------------ ### Added -- Add [positional-arguments] attribute ([#2151](https://github.com/casey/just/pull/2151)) +- Add [positional-arguments] attribute ([#2151](https://github.com/casey/just/pull/2151) by [casey](https://github.com/casey)) - Use `--justfile` in Fish shell completions ([#2148](https://github.com/casey/just/pull/2148) by [rubot](https://github.com/rubot)) - Add `is_dependency()` function ([#2139](https://github.com/casey/just/pull/2139) by [neunenak](https://github.com/neunenak)) -- Allow printing nu completion script with `just --completions nushell` ([#2140](https://github.com/casey/just/pull/2140)) +- Allow printing nu completion script with `just --completions nushell` ([#2140](https://github.com/casey/just/pull/2140) by [casey](https://github.com/casey)) - Add `[ATTRIBUTE: VALUE]` shorthand ([#2136](https://github.com/casey/just/pull/2136) by [neunenak](https://github.com/neunenak)) - Allow unexporting environment variables ([#2098](https://github.com/casey/just/pull/2098) by [neunenak](https://github.com/neunenak)) ### Fixed -- Load environment file from dotenv-path relative to working directory ([#2152](https://github.com/casey/just/pull/2152)) -- Fix `fzf` chooser preview with space-separated module paths ([#2141](https://github.com/casey/just/pull/2141)) +- Load environment file from dotenv-path relative to working directory ([#2152](https://github.com/casey/just/pull/2152) by [casey](https://github.com/casey)) +- Fix `fzf` chooser preview with space-separated module paths ([#2141](https://github.com/casey/just/pull/2141) by [casey](https://github.com/casey)) ### Misc -- Improve argument parsing and error handling for submodules ([#2154](https://github.com/casey/just/pull/2154)) -- Document shell expanded string defaults ([#2153](https://github.com/casey/just/pull/2153)) -- Test bare bash path in shebang on windows ([#2144](https://github.com/casey/just/pull/2144)) -- Test shell not found error messages ([#2145](https://github.com/casey/just/pull/2145)) +- Improve argument parsing and error handling for submodules ([#2154](https://github.com/casey/just/pull/2154) by [casey](https://github.com/casey)) +- Document shell expanded string defaults ([#2153](https://github.com/casey/just/pull/2153) by [casey](https://github.com/casey)) +- Test bare bash path in shebang on windows ([#2144](https://github.com/casey/just/pull/2144) by [casey](https://github.com/casey)) +- Test shell not found error messages ([#2145](https://github.com/casey/just/pull/2145) by [casey](https://github.com/casey)) - Refactor evaluator ([#2138](https://github.com/casey/just/pull/2138) by [neunenak](https://github.com/neunenak)) -- Fix man page generation in release workflow ([#2132](https://github.com/casey/just/pull/2132)) +- Fix man page generation in release workflow ([#2132](https://github.com/casey/just/pull/2132) by [casey](https://github.com/casey)) [1.28.0](https://github.com/casey/just/releases/tag/1.28.0) - 2024-06-05 ------------------------------------------------------------------------ ### Changed -- Write shebang recipes to $XDG_RUNTIME_DIR ([#2128](https://github.com/casey/just/pull/2128)) -- Add `set dotenv-required` to require an environment file ([#2116](https://github.com/casey/just/pull/2116)) -- Don't display submodule recipes in `--list` ([#2112](https://github.com/casey/just/pull/2112)) +- Write shebang recipes to $XDG_RUNTIME_DIR ([#2128](https://github.com/casey/just/pull/2128) by [casey](https://github.com/casey)) +- Add `set dotenv-required` to require an environment file ([#2116](https://github.com/casey/just/pull/2116) by [casey](https://github.com/casey)) +- Don't display submodule recipes in `--list` ([#2112](https://github.com/casey/just/pull/2112) by [casey](https://github.com/casey)) ### Added -- Allow listing recipes in submodules with `--list-submodules` ([#2113](https://github.com/casey/just/pull/2113)) -- Show recipes in submodules with `--show RECIPE::PATH` ([#2111](https://github.com/casey/just/pull/2111)) +- Allow listing recipes in submodules with `--list-submodules` ([#2113](https://github.com/casey/just/pull/2113) by [casey](https://github.com/casey)) +- Show recipes in submodules with `--show RECIPE::PATH` ([#2111](https://github.com/casey/just/pull/2111) by [casey](https://github.com/casey)) - Add `--timestamp-format` ([#2106](https://github.com/casey/just/pull/2106) by [neunenak](https://github.com/neunenak)) -- Allow listing submodule recipes with `--list PATH` ([#2108](https://github.com/casey/just/pull/2108)) +- Allow listing submodule recipes with `--list PATH` ([#2108](https://github.com/casey/just/pull/2108) by [casey](https://github.com/casey)) - Print recipe command timestamps with `--timestamps` ([#2084](https://github.com/casey/just/pull/2084) by [neunenak](https://github.com/neunenak)) -- Add `module_file()` and `module_directory()` functions ([#2105](https://github.com/casey/just/pull/2105)) +- Add `module_file()` and `module_directory()` functions ([#2105](https://github.com/casey/just/pull/2105) by [casey](https://github.com/casey)) ### Fixed -- Use space-separated recipe paths in `--choose` ([#2115](https://github.com/casey/just/pull/2115)) +- Use space-separated recipe paths in `--choose` ([#2115](https://github.com/casey/just/pull/2115) by [casey](https://github.com/casey)) - Fix bash completion for aliases ([#2104](https://github.com/casey/just/pull/2104) by [laniakea64](https://github.com/laniakea64)) ### Misc -- Don't check in manpage ([#2130](https://github.com/casey/just/pull/2130)) -- Document default shell ([#2129](https://github.com/casey/just/pull/2129)) +- Don't check in manpage ([#2130](https://github.com/casey/just/pull/2130) by [casey](https://github.com/casey)) +- Document default shell ([#2129](https://github.com/casey/just/pull/2129) by [casey](https://github.com/casey)) - Remove duplicate section in Chinese readme ([#2127](https://github.com/casey/just/pull/2127) by [potterxu](https://github.com/potterxu)) - Update Chinese readme ([#2124](https://github.com/casey/just/pull/2124) by [potterxu](https://github.com/potterxu)) - Fix typo in readme ([#2122](https://github.com/casey/just/pull/2122) by [potterxu](https://github.com/potterxu)) -- Don't check in auto-generated completion scripts ([#2120](https://github.com/casey/just/pull/2120)) -- Document when dependencies run in readme ([#2103](https://github.com/casey/just/pull/2103)) +- Don't check in auto-generated completion scripts ([#2120](https://github.com/casey/just/pull/2120) by [casey](https://github.com/casey)) +- Document when dependencies run in readme ([#2103](https://github.com/casey/just/pull/2103) by [casey](https://github.com/casey)) - Build aarch64-pc-windows-msvc release binaries ([#2100](https://github.com/casey/just/pull/2100) by [alshdavid](https://github.com/alshdavid)) -- Clarify that `dotenv-path`-given env file is required ([#2099](https://github.com/casey/just/pull/2099)) -- Print multi-line doc comments before recipe in `--list` ([#2090](https://github.com/casey/just/pull/2090)) -- List unsorted imported recipes by import depth and offset ([#2092](https://github.com/casey/just/pull/2092)) +- Clarify that `dotenv-path`-given env file is required ([#2099](https://github.com/casey/just/pull/2099) by [casey](https://github.com/casey)) +- Print multi-line doc comments before recipe in `--list` ([#2090](https://github.com/casey/just/pull/2090) by [casey](https://github.com/casey)) +- List unsorted imported recipes by import depth and offset ([#2092](https://github.com/casey/just/pull/2092) by [casey](https://github.com/casey)) - Update README.md ([#2091](https://github.com/casey/just/pull/2091) by [laniakea64](https://github.com/laniakea64)) [1.27.0](https://github.com/casey/just/releases/tag/1.27.0) - 2024-05-25 ------------------------------------------------------------------------ ### Changed -- Use cache dir for temporary files ([#2067](https://github.com/casey/just/pull/2067)) +- Use cache dir for temporary files ([#2067](https://github.com/casey/just/pull/2067) by [casey](https://github.com/casey)) ### Added - Add `[doc]` attribute to set and suppress documentation comments ([#2050](https://github.com/casey/just/pull/2050) by [neunenak](https://github.com/neunenak)) -- Add source_file() and source_directory() functions ([#2088](https://github.com/casey/just/pull/2088)) +- Add source_file() and source_directory() functions ([#2088](https://github.com/casey/just/pull/2088) by [casey](https://github.com/casey)) - Add recipe groups ([#1842](https://github.com/casey/just/pull/1842) by [neunenak](https://github.com/neunenak)) - Add shell() function for running external commands ([#2047](https://github.com/casey/just/pull/2047) by [gyreas](https://github.com/gyreas)) - Add `--global-justfile` flag ([#1846](https://github.com/casey/just/pull/1846) by [neunenak](https://github.com/neunenak)) -- Add shell-expanded strings ([#2055](https://github.com/casey/just/pull/2055)) +- Add shell-expanded strings ([#2055](https://github.com/casey/just/pull/2055) by [casey](https://github.com/casey)) - Add `encode_uri_component` function ([#2052](https://github.com/casey/just/pull/2052) by [laniakea64](https://github.com/laniakea64)) - Add `choose` function for generating random strings ([#2049](https://github.com/casey/just/pull/2049) by [laniakea64](https://github.com/laniakea64)) -- Add predefined constants ([#2054](https://github.com/casey/just/pull/2054)) +- Add predefined constants ([#2054](https://github.com/casey/just/pull/2054) by [casey](https://github.com/casey)) - Allow setting some command-line options with environment variables ([#2044](https://github.com/casey/just/pull/2044) by [neunenak](https://github.com/neunenak)) - Add prepend() function ([#2045](https://github.com/casey/just/pull/2045) by [gyreas](https://github.com/gyreas)) - Add append() function ([#2046](https://github.com/casey/just/pull/2046) by [gyreas](https://github.com/gyreas)) -- Add --man subcommand ([#2041](https://github.com/casey/just/pull/2041)) -- Make `dotenv-path` relative to working directory ([#2040](https://github.com/casey/just/pull/2040)) +- Add --man subcommand ([#2041](https://github.com/casey/just/pull/2041) by [casey](https://github.com/casey)) +- Make `dotenv-path` relative to working directory ([#2040](https://github.com/casey/just/pull/2040) by [casey](https://github.com/casey)) - Add `assert` expression ([#1845](https://github.com/casey/just/pull/1845) by [de1iza](https://github.com/de1iza)) - Add 'allow-duplicate-variables' setting ([#1922](https://github.com/casey/just/pull/1922) by [Mijago](https://github.com/Mijago)) ### Fixed -- List modules in source order with `--unsorted` ([#2085](https://github.com/casey/just/pull/2085)) -- Show submodule recipes in --choose ([#2069](https://github.com/casey/just/pull/2069)) -- Allow multiple imports of the same file in different modules ([#2065](https://github.com/casey/just/pull/2065)) -- Fix submodule recipe listing indentation ([#2063](https://github.com/casey/just/pull/2063)) -- Pass command as first argument to `shell` ([#2061](https://github.com/casey/just/pull/2061)) -- Allow shell expanded strings in mod and import paths ([#2059](https://github.com/casey/just/pull/2059)) -- Run imported recipes in root justfile with correct working directory ([#2056](https://github.com/casey/just/pull/2056)) -- Fix output `\r\n` stripping ([#2035](https://github.com/casey/just/pull/2035)) - -### Misc -- Forbid whitespace in shell-expanded string prefixes ([#2083](https://github.com/casey/just/pull/2083)) -- Add Debian and Ubuntu install instructions to readme ([#2072](https://github.com/casey/just/pull/2072)) -- Remove snap installation instructions from readme ([#2070](https://github.com/casey/just/pull/2070)) +- List modules in source order with `--unsorted` ([#2085](https://github.com/casey/just/pull/2085) by [casey](https://github.com/casey)) +- Show submodule recipes in --choose ([#2069](https://github.com/casey/just/pull/2069) by [casey](https://github.com/casey)) +- Allow multiple imports of the same file in different modules ([#2065](https://github.com/casey/just/pull/2065) by [casey](https://github.com/casey)) +- Fix submodule recipe listing indentation ([#2063](https://github.com/casey/just/pull/2063) by [casey](https://github.com/casey)) +- Pass command as first argument to `shell` ([#2061](https://github.com/casey/just/pull/2061) by [casey](https://github.com/casey)) +- Allow shell expanded strings in mod and import paths ([#2059](https://github.com/casey/just/pull/2059) by [casey](https://github.com/casey)) +- Run imported recipes in root justfile with correct working directory ([#2056](https://github.com/casey/just/pull/2056) by [casey](https://github.com/casey)) +- Fix output `\r\n` stripping ([#2035](https://github.com/casey/just/pull/2035) by [casey](https://github.com/casey)) + +### Misc +- Forbid whitespace in shell-expanded string prefixes ([#2083](https://github.com/casey/just/pull/2083) by [casey](https://github.com/casey)) +- Add Debian and Ubuntu install instructions to readme ([#2072](https://github.com/casey/just/pull/2072) by [casey](https://github.com/casey)) +- Remove snap installation instructions from readme ([#2070](https://github.com/casey/just/pull/2070) by [casey](https://github.com/casey)) - Fallback to wget in install script if curl isn't available([#1913](https://github.com/casey/just/pull/1913) by [tgross35](https://github.com/tgross35)) -- Use std::io::IsTerminal instead of atty crate ([#2066](https://github.com/casey/just/pull/2066)) +- Use std::io::IsTerminal instead of atty crate ([#2066](https://github.com/casey/just/pull/2066) by [casey](https://github.com/casey)) - Improve `shell()` documentation ([#2060](https://github.com/casey/just/pull/2060) by [laniakea64](https://github.com/laniakea64)) - Add bash completion for snap ([#2058](https://github.com/casey/just/pull/2058) by [albertodonato](https://github.com/albertodonato)) -- Refactor list subcommand ([#2062](https://github.com/casey/just/pull/2062)) -- Document working directory ([#2053](https://github.com/casey/just/pull/2053)) -- Replace FunctionContext with Evaluator ([#2048](https://github.com/casey/just/pull/2048)) +- Refactor list subcommand ([#2062](https://github.com/casey/just/pull/2062) by [casey](https://github.com/casey)) +- Document working directory ([#2053](https://github.com/casey/just/pull/2053) by [casey](https://github.com/casey)) +- Replace FunctionContext with Evaluator ([#2048](https://github.com/casey/just/pull/2048) by [casey](https://github.com/casey)) - Update clap to version 4 ([#1924](https://github.com/casey/just/pull/1924) by [poliorcetics](https://github.com/poliorcetics)) - Cleanup ([#2026](https://github.com/casey/just/pull/2026) by [adamnemecek](https://github.com/adamnemecek)) -- Increase --list maximum alignable width from 30 to 50 ([#2039](https://github.com/casey/just/pull/2039)) -- Document using `env -S` ([#2038](https://github.com/casey/just/pull/2038)) +- Increase --list maximum alignable width from 30 to 50 ([#2039](https://github.com/casey/just/pull/2039) by [casey](https://github.com/casey)) +- Document using `env -S` ([#2038](https://github.com/casey/just/pull/2038) by [casey](https://github.com/casey)) - Update line continuation documentation ([#1998](https://github.com/casey/just/pull/1998) by [laniakea64](https://github.com/laniakea64)) - Add example using GNU parallel to run tasks in concurrently ([#1915](https://github.com/casey/just/pull/1915) by [amarao](https://github.com/amarao)) -- Placate clippy: use `clone_into` ([#2037](https://github.com/casey/just/pull/2037)) +- Placate clippy: use `clone_into` ([#2037](https://github.com/casey/just/pull/2037) by [casey](https://github.com/casey)) - Use --command-color when printing shebang recipe commands ([#1911](https://github.com/casey/just/pull/1911) by [avi-cenna](https://github.com/avi-cenna)) -- Document how to use watchexec to re-run recipes when files change ([#2036](https://github.com/casey/just/pull/2036)) -- Update VS Code extensions in readme ([#2034](https://github.com/casey/just/pull/2034)) -- Add rust:just repology package table to readme ([#2032](https://github.com/casey/just/pull/2032)) +- Document how to use watchexec to re-run recipes when files change ([#2036](https://github.com/casey/just/pull/2036) by [casey](https://github.com/casey)) +- Update VS Code extensions in readme ([#2034](https://github.com/casey/just/pull/2034) by [casey](https://github.com/casey)) +- Add rust:just repology package table to readme ([#2032](https://github.com/casey/just/pull/2032) by [casey](https://github.com/casey)) [1.26.0](https://github.com/casey/just/releases/tag/1.26.0) - 2024-05-13 ------------------------------------------------------------------------ @@ -132,8 +132,8 @@ Changelog - Update softprops/action-gh-release ([#2029](https://github.com/casey/just/pull/2029) by [app/dependabot](https://github.com/app/dependabot)) - Update dependencies ([#1999](https://github.com/casey/just/pull/1999) by [neunenak](https://github.com/neunenak)) - Bump peaceiris/actions-gh-pages to version 4 ([#2005](https://github.com/casey/just/pull/2005) by [app/dependabot](https://github.com/app/dependabot)) -- Clarify that janus operates on public justfiles only ([#2021](https://github.com/casey/just/pull/2021)) -- Fix Error::TmpdirIo error message ([#1987](https://github.com/casey/just/pull/1987)) +- Clarify that janus operates on public justfiles only ([#2021](https://github.com/casey/just/pull/2021) by [casey](https://github.com/casey)) +- Fix Error::TmpdirIo error message ([#1987](https://github.com/casey/just/pull/1987) by [casey](https://github.com/casey)) - Update softprops/action-gh-release ([#1973](https://github.com/casey/just/pull/1973) by [app/dependabot](https://github.com/app/dependabot)) - Rename `delete` example recipe to `delete-all` ([#1966](https://github.com/casey/just/pull/1966) by [aarmn](https://github.com/aarmn)) - Update softprops/action-gh-release ([#1954](https://github.com/casey/just/pull/1954) by [app/dependabot](https://github.com/app/dependabot)) @@ -142,14 +142,14 @@ Changelog [1.25.2](https://github.com/casey/just/releases/tag/1.25.2) - 2024-03-10 ------------------------------------------------------------------------ -- Unpin ctrlc ([#1951](https://github.com/casey/just/pull/1951)) +- Unpin ctrlc ([#1951](https://github.com/casey/just/pull/1951) by [casey](https://github.com/casey)) [1.25.1](https://github.com/casey/just/releases/tag/1.25.1) - 2024-03-09 ------------------------------------------------------------------------ ### Misc -- Pin ctrlc to version 3.1.1 ([#1945](https://github.com/casey/just/pull/1945)) -- Fix AArch64 release build error ([#1942](https://github.com/casey/just/pull/1942)) +- Pin ctrlc to version 3.1.1 ([#1945](https://github.com/casey/just/pull/1945) by [casey](https://github.com/casey)) +- Fix AArch64 release build error ([#1942](https://github.com/casey/just/pull/1942) by [casey](https://github.com/casey)) [1.25.0](https://github.com/casey/just/releases/tag/1.25.0) - 2024-03-07 ------------------------------------------------------------------------ @@ -159,7 +159,7 @@ Changelog ### Misc - Fix readme typo ([#1936](https://github.com/casey/just/pull/1936) by [Justintime50](https://github.com/Justintime50)) -- Use unwrap_or_default ([#1928](https://github.com/casey/just/pull/1928)) +- Use unwrap_or_default ([#1928](https://github.com/casey/just/pull/1928) by [casey](https://github.com/casey)) - Set codegen-units to 1 reduce release binary size ([#1920](https://github.com/casey/just/pull/1920) by [amarao](https://github.com/amarao)) - Document openSUSE package ([#1918](https://github.com/casey/just/pull/1918) by [sfalken](https://github.com/sfalken)) - Fix install.sh shellcheck warnings ([#1912](https://github.com/casey/just/pull/1912) by [tgross35](https://github.com/tgross35)) @@ -169,22 +169,22 @@ Changelog ### Added - Support recipe paths containing `::` in Bash completion script ([#1863](https://github.com/casey/just/pull/1863) by [crdx](https://github.com/crdx)) -- Add function to canonicalize paths ([#1859](https://github.com/casey/just/pull/1859)) +- Add function to canonicalize paths ([#1859](https://github.com/casey/just/pull/1859) by [casey](https://github.com/casey)) ### Misc - Document installing just on Github Actions in readme ([#1867](https://github.com/casey/just/pull/1867) by [cclauss](https://github.com/cclauss)) -- Use unlikely-to-be-set variable name in env tests ([#1882](https://github.com/casey/just/pull/1882)) -- Skip write_error test if running as root ([#1881](https://github.com/casey/just/pull/1881)) -- Convert run_shebang into integration test ([#1880](https://github.com/casey/just/pull/1880)) -- Install mdbook with cargo in CI workflow ([#1877](https://github.com/casey/just/pull/1877)) +- Use unlikely-to-be-set variable name in env tests ([#1882](https://github.com/casey/just/pull/1882) by [casey](https://github.com/casey)) +- Skip write_error test if running as root ([#1881](https://github.com/casey/just/pull/1881) by [casey](https://github.com/casey)) +- Convert run_shebang into integration test ([#1880](https://github.com/casey/just/pull/1880) by [casey](https://github.com/casey)) +- Install mdbook with cargo in CI workflow ([#1877](https://github.com/casey/just/pull/1877) by [casey](https://github.com/casey)) - Remove deprecated actions-rs/toolchain ([#1874](https://github.com/casey/just/pull/1874) by [cclauss](https://github.com/cclauss)) - Fix Gentoo package link ([#1875](https://github.com/casey/just/pull/1875) by [vozbu](https://github.com/vozbu)) - Fix typos found by codespell ([#1872](https://github.com/casey/just/pull/1872) by [cclauss](https://github.com/cclauss)) - Replace deprecated set-output command in Github Actions workflows ([#1869](https://github.com/casey/just/pull/1869) by [cclauss](https://github.com/cclauss)) - Update `actions/checkout` and `softprops/action-gh-release` ([#1871](https://github.com/casey/just/pull/1871) by [app/dependabot](https://github.com/app/dependabot)) - Keep GitHub Actions up to date with Dependabot ([#1868](https://github.com/casey/just/pull/1868) by [cclauss](https://github.com/cclauss)) -- Add contrib directory ([#1870](https://github.com/casey/just/pull/1870)) -- Fix install script ([#1844](https://github.com/casey/just/pull/1844)) +- Add contrib directory ([#1870](https://github.com/casey/just/pull/1870) by [casey](https://github.com/casey)) +- Fix install script ([#1844](https://github.com/casey/just/pull/1844) by [casey](https://github.com/casey)) [1.23.0](https://github.com/casey/just/releases/tag/1.23.0) - 2024-01-12 ------------------------------------------------------------------------ @@ -197,82 +197,82 @@ Changelog - Add `--no-deps` to skip running recipe dependencies ([#1819](https://github.com/casey/just/pull/1819) by [ngharrington](https://github.com/ngharrington)) ### Fixed -- Run imports in working directory of importer ([#1817](https://github.com/casey/just/pull/1817)) +- Run imports in working directory of importer ([#1817](https://github.com/casey/just/pull/1817) by [casey](https://github.com/casey)) ### Misc -- Include completion scripts in releases ([#1837](https://github.com/casey/just/pull/1837)) -- Tweak readme table formatting ([#1836](https://github.com/casey/just/pull/1836)) +- Include completion scripts in releases ([#1837](https://github.com/casey/just/pull/1837) by [casey](https://github.com/casey)) +- Tweak readme table formatting ([#1836](https://github.com/casey/just/pull/1836) by [casey](https://github.com/casey)) - Don't abbreviate just in README ([#1831](https://github.com/casey/just/pull/1831) by [thled](https://github.com/thled)) - Ignore [private] recipes in just --list ([#1816](https://github.com/casey/just/pull/1816) by [crdx](https://github.com/crdx)) -- Add a dash to tempdir prefix ([#1828](https://github.com/casey/just/pull/1828)) +- Add a dash to tempdir prefix ([#1828](https://github.com/casey/just/pull/1828) by [casey](https://github.com/casey)) [1.22.1](https://github.com/casey/just/releases/tag/1.22.1) - 2024-01-08 ------------------------------------------------------------------------ ### Fixed -- Don't conflate recipes with the same name in different modules ([#1825](https://github.com/casey/just/pull/1825)) +- Don't conflate recipes with the same name in different modules ([#1825](https://github.com/casey/just/pull/1825) by [casey](https://github.com/casey)) ### Misc - Clarify that UUID is version 4 ([#1821](https://github.com/casey/just/pull/1821) by [tgross35](https://github.com/tgross35)) -- Make sigil stripping from recipe lines less incomprehensible ([#1812](https://github.com/casey/just/pull/1812)) -- Refactor invalid path argument check ([#1811](https://github.com/casey/just/pull/1811)) +- Make sigil stripping from recipe lines less incomprehensible ([#1812](https://github.com/casey/just/pull/1812) by [casey](https://github.com/casey)) +- Refactor invalid path argument check ([#1811](https://github.com/casey/just/pull/1811) by [casey](https://github.com/casey)) [1.22.0](https://github.com/casey/just/releases/tag/1.22.0) - 2023-12-31 ------------------------------------------------------------------------ ### Added -- Recipes can be invoked with path syntax ([#1809](https://github.com/casey/just/pull/1809)) -- Add `--format` and `--initialize` as aliases for `--fmt` and `--init` ([#1802](https://github.com/casey/just/pull/1802)) +- Recipes can be invoked with path syntax ([#1809](https://github.com/casey/just/pull/1809) by [casey](https://github.com/casey)) +- Add `--format` and `--initialize` as aliases for `--fmt` and `--init` ([#1802](https://github.com/casey/just/pull/1802) by [casey](https://github.com/casey)) ### Misc -- Move table of contents pointer to right ([#1806](https://github.com/casey/just/pull/1806)) +- Move table of contents pointer to right ([#1806](https://github.com/casey/just/pull/1806) by [casey](https://github.com/casey)) [1.21.0](https://github.com/casey/just/releases/tag/1.21.0) - 2023-12-29 ------------------------------------------------------------------------ ### Added -- Optional modules and imports ([#1797](https://github.com/casey/just/pull/1797)) -- Print submodule recipes in --summary ([#1794](https://github.com/casey/just/pull/1794)) +- Optional modules and imports ([#1797](https://github.com/casey/just/pull/1797) by [casey](https://github.com/casey)) +- Print submodule recipes in --summary ([#1794](https://github.com/casey/just/pull/1794) by [casey](https://github.com/casey)) ### Misc -- Use box-drawing characters in error messages ([#1798](https://github.com/casey/just/pull/1798)) -- Use Self ([#1795](https://github.com/casey/just/pull/1795)) +- Use box-drawing characters in error messages ([#1798](https://github.com/casey/just/pull/1798) by [casey](https://github.com/casey)) +- Use Self ([#1795](https://github.com/casey/just/pull/1795) by [casey](https://github.com/casey)) [1.20.0](https://github.com/casey/just/releases/tag/1.20.0) - 2023-12-28 ------------------------------------------------------------------------ ### Added -- Allow mod statements with path to source file ([#1786](https://github.com/casey/just/pull/1786)) +- Allow mod statements with path to source file ([#1786](https://github.com/casey/just/pull/1786) by [casey](https://github.com/casey)) ### Changed -- Expand tilde in import and module paths ([#1792](https://github.com/casey/just/pull/1792)) -- Override imported recipes ([#1790](https://github.com/casey/just/pull/1790)) -- Run recipes with working directory set to submodule directory ([#1788](https://github.com/casey/just/pull/1788)) +- Expand tilde in import and module paths ([#1792](https://github.com/casey/just/pull/1792) by [casey](https://github.com/casey)) +- Override imported recipes ([#1790](https://github.com/casey/just/pull/1790) by [casey](https://github.com/casey)) +- Run recipes with working directory set to submodule directory ([#1788](https://github.com/casey/just/pull/1788) by [casey](https://github.com/casey)) ### Misc -- Document import override behavior ([#1791](https://github.com/casey/just/pull/1791)) -- Document submodule working directory ([#1789](https://github.com/casey/just/pull/1789)) +- Document import override behavior ([#1791](https://github.com/casey/just/pull/1791) by [casey](https://github.com/casey)) +- Document submodule working directory ([#1789](https://github.com/casey/just/pull/1789) by [casey](https://github.com/casey)) [1.19.0](https://github.com/casey/just/releases/tag/1.19.0) - 2023-12-27 ------------------------------------------------------------------------ ### Added -- Add modules ([#1782](https://github.com/casey/just/pull/1782)) +- Add modules ([#1782](https://github.com/casey/just/pull/1782) by [casey](https://github.com/casey)) [1.18.1](https://github.com/casey/just/releases/tag/1.18.1) - 2023-12-24 ------------------------------------------------------------------------ ### Added -- Display a descriptive error for `!include` directives ([#1779](https://github.com/casey/just/pull/1779)) +- Display a descriptive error for `!include` directives ([#1779](https://github.com/casey/just/pull/1779) by [casey](https://github.com/casey)) [1.18.0](https://github.com/casey/just/releases/tag/1.18.0) - 2023-12-24 ------------------------------------------------------------------------ ### Added -- Stabilize `!include path` as `import 'path'` ([#1771](https://github.com/casey/just/pull/1771)) +- Stabilize `!include path` as `import 'path'` ([#1771](https://github.com/casey/just/pull/1771) by [casey](https://github.com/casey)) ### Misc -- Tweak readme ([#1775](https://github.com/casey/just/pull/1775)) +- Tweak readme ([#1775](https://github.com/casey/just/pull/1775) by [casey](https://github.com/casey)) [1.17.0](https://github.com/casey/just/releases/tag/1.17.0) - 2023-12-20 ------------------------------------------------------------------------ @@ -281,7 +281,7 @@ Changelog - Add `[confirm]` attribute ([#1723](https://github.com/casey/just/pull/1723) by [Hwatwasthat](https://github.com/Hwatwasthat)) ### Changed -- Don't default to included recipes ([#1740](https://github.com/casey/just/pull/1740)) +- Don't default to included recipes ([#1740](https://github.com/casey/just/pull/1740) by [casey](https://github.com/casey)) ### Fixed - Pass justfile path to default chooser ([#1759](https://github.com/casey/just/pull/1759) by [Qeole](https://github.com/Qeole)) @@ -291,17 +291,17 @@ Changelog - Update Gentoo package repository ([#1757](https://github.com/casey/just/pull/1757) by [paul-jewell](https://github.com/paul-jewell)) - Fix readme header level ([#1752](https://github.com/casey/just/pull/1752) by [laniakea64](https://github.com/laniakea64)) - Document line continuations ([#1751](https://github.com/casey/just/pull/1751) by [laniakea64](https://github.com/laniakea64)) -- List included recipes in load order ([#1745](https://github.com/casey/just/pull/1745)) +- List included recipes in load order ([#1745](https://github.com/casey/just/pull/1745) by [casey](https://github.com/casey)) - Fix build badge in zh readme ([#1743](https://github.com/casey/just/pull/1743) by [chenrui333](https://github.com/chenrui333)) -- Rename Justfile::first → Justfile::default ([#1741](https://github.com/casey/just/pull/1741)) -- Add file paths to error messages ([#1737](https://github.com/casey/just/pull/1737)) +- Rename Justfile::first → Justfile::default ([#1741](https://github.com/casey/just/pull/1741) by [casey](https://github.com/casey)) +- Add file paths to error messages ([#1737](https://github.com/casey/just/pull/1737) by [casey](https://github.com/casey)) - Move !include processing into compiler ([#1618](https://github.com/casey/just/pull/1618) by [neunenak](https://github.com/neunenak)) - Update Arch Linux package URL in readme ([#1733](https://github.com/casey/just/pull/1733) by [felixonmars](https://github.com/felixonmars)) - Clarify that aliases can only be used on the command line ([#1726](https://github.com/casey/just/pull/1726) by [laniakea64](https://github.com/laniakea64)) -- Remove VALID_ALIAS_ATTRIBUTES array ([#1731](https://github.com/casey/just/pull/1731)) +- Remove VALID_ALIAS_ATTRIBUTES array ([#1731](https://github.com/casey/just/pull/1731) by [casey](https://github.com/casey)) - Fix justfile search link in Chinese docs ([#1730](https://github.com/casey/just/pull/1730) by [oluceps](https://github.com/oluceps)) - Add example of Windows shebang handling ([#1709](https://github.com/casey/just/pull/1709) by [pfmoore](https://github.com/pfmoore)) -- Fix CI ([#1728](https://github.com/casey/just/pull/1728)) +- Fix CI ([#1728](https://github.com/casey/just/pull/1728) by [casey](https://github.com/casey)) [1.16.0](https://github.com/casey/just/releases/tag/1.16.0) - 2023-11-08 ------------------------------------------------------------------------ @@ -319,8 +319,8 @@ Changelog - Fix readme typo ([#1717](https://github.com/casey/just/pull/1717) by [barraponto](https://github.com/barraponto)) - Clean up error display ([#1699](https://github.com/casey/just/pull/1699) by [nyurik](https://github.com/nyurik)) - Misc fixes ([#1700](https://github.com/casey/just/pull/1700) by [nyurik](https://github.com/nyurik)) -- Fix readme build badge ([#1697](https://github.com/casey/just/pull/1697)) -- Fix set tempdir grammar ([#1695](https://github.com/casey/just/pull/1695)) +- Fix readme build badge ([#1697](https://github.com/casey/just/pull/1697) by [casey](https://github.com/casey)) +- Fix set tempdir grammar ([#1695](https://github.com/casey/just/pull/1695) by [casey](https://github.com/casey)) - Add version to attributes ([#1694](https://github.com/casey/just/pull/1694) by [JoeyTeng](https://github.com/JoeyTeng)) - Update README.md ([#1691](https://github.com/casey/just/pull/1691) by [laniakea64](https://github.com/laniakea64)) @@ -333,7 +333,7 @@ Changelog - Allow unstable features to be enabled with environment variable ([#1588](https://github.com/casey/just/pull/1588) by [neunenak](https://github.com/neunenak)) - Add num_cpus() function ([#1568](https://github.com/casey/just/pull/1568) by [schultetwin1](https://github.com/schultetwin1)) - Allow escaping newlines ([#1551](https://github.com/casey/just/pull/1551) by [ids1024](https://github.com/ids1024)) -- Stabilize JSON dump format ([#1633](https://github.com/casey/just/pull/1633)) +- Stabilize JSON dump format ([#1633](https://github.com/casey/just/pull/1633) by [casey](https://github.com/casey)) - Add env() function ([#1613](https://github.com/casey/just/pull/1613) by [kykyi](https://github.com/kykyi)) ### Changed @@ -345,10 +345,10 @@ Changelog - Update Indentation Documentation ([#1600](https://github.com/casey/just/pull/1600) by [GinoMan](https://github.com/GinoMan)) - Fix triple-quoted string example in readme ([#1620](https://github.com/casey/just/pull/1620) by [avi-cenna](https://github.com/avi-cenna)) - README fix: the -d in `mktemp -d` is required to created folders. ([#1688](https://github.com/casey/just/pull/1688) by [gl-yziquel](https://github.com/gl-yziquel)) -- Placate clippy ([#1689](https://github.com/casey/just/pull/1689)) +- Placate clippy ([#1689](https://github.com/casey/just/pull/1689) by [casey](https://github.com/casey)) - Fix README typos ([#1660](https://github.com/casey/just/pull/1660) by [akuhnregnier](https://github.com/akuhnregnier)) -- Document Windows Package Manager install instructions ([#1656](https://github.com/casey/just/pull/1656)) -- Test unpaired escaped carriage return error ([#1650](https://github.com/casey/just/pull/1650)) +- Document Windows Package Manager install instructions ([#1656](https://github.com/casey/just/pull/1656) by [casey](https://github.com/casey)) +- Test unpaired escaped carriage return error ([#1650](https://github.com/casey/just/pull/1650) by [casey](https://github.com/casey)) - Avoid grep aliases in bash completions ([#1622](https://github.com/casey/just/pull/1622) by [BojanStipic](https://github.com/BojanStipic)) - Clarify [unix] attribute in readme ([#1619](https://github.com/casey/just/pull/1619) by [neunenak](https://github.com/neunenak)) - Add descriptions to fish recipe completions ([#1578](https://github.com/casey/just/pull/1578) by [patricksjackson](https://github.com/patricksjackson)) @@ -364,37 +364,37 @@ Changelog ### Misc - Fix justfile search link ([#1607](https://github.com/casey/just/pull/1607) by [jbaber](https://github.com/jbaber)) -- Ignore clippy::let_underscore_untyped ([#1609](https://github.com/casey/just/pull/1609)) +- Ignore clippy::let_underscore_untyped ([#1609](https://github.com/casey/just/pull/1609) by [casey](https://github.com/casey)) - Link to private recipes section in readme ([#1542](https://github.com/casey/just/pull/1542) by [quad](https://github.com/quad)) - Update README to reflect new attribute syntax ([#1538](https://github.com/casey/just/pull/1538) by [neunenak](https://github.com/neunenak)) - Allow multiple attributes on one line ([#1537](https://github.com/casey/just/pull/1537) by [neunenak](https://github.com/neunenak)) - Analyze and Compiler tweaks ([#1534](https://github.com/casey/just/pull/1534) by [neunenak](https://github.com/neunenak)) -- Downgrade to TLS 1.2 in install script ([#1536](https://github.com/casey/just/pull/1536)) +- Downgrade to TLS 1.2 in install script ([#1536](https://github.com/casey/just/pull/1536) by [casey](https://github.com/casey)) [1.13.0](https://github.com/casey/just/releases/tag/1.13.0) - 2023-01-24 ------------------------------------------------------------------------ ### Added - Add -n as a short flag for --for dry-run ([#1524](https://github.com/casey/just/pull/1524) by [maiha](https://github.com/maiha)) -- Add invocation_directory_native() ([#1507](https://github.com/casey/just/pull/1507)) +- Add invocation_directory_native() ([#1507](https://github.com/casey/just/pull/1507) by [casey](https://github.com/casey)) ### Changed - Ignore additional search path arguments ([#1528](https://github.com/casey/just/pull/1528) by [neunenak](https://github.com/neunenak)) -- Only print fallback message when verbose ([#1510](https://github.com/casey/just/pull/1510)) -- Print format diff to stdout ([#1506](https://github.com/casey/just/pull/1506)) +- Only print fallback message when verbose ([#1510](https://github.com/casey/just/pull/1510) by [casey](https://github.com/casey)) +- Print format diff to stdout ([#1506](https://github.com/casey/just/pull/1506) by [casey](https://github.com/casey)) ### Fixed -- Test passing dot as argument between justfiles ([#1530](https://github.com/casey/just/pull/1530)) -- Fix install script default directory ([#1525](https://github.com/casey/just/pull/1525)) +- Test passing dot as argument between justfiles ([#1530](https://github.com/casey/just/pull/1530) by [casey](https://github.com/casey)) +- Fix install script default directory ([#1525](https://github.com/casey/just/pull/1525) by [casey](https://github.com/casey)) ### Misc -- Note that justfiles are order-insensitive ([#1529](https://github.com/casey/just/pull/1529)) +- Note that justfiles are order-insensitive ([#1529](https://github.com/casey/just/pull/1529) by [casey](https://github.com/casey)) - Borrow Ast in Analyser ([#1527](https://github.com/casey/just/pull/1527) by [neunenak](https://github.com/neunenak)) -- Ignore chooser tests ([#1513](https://github.com/casey/just/pull/1513)) +- Ignore chooser tests ([#1513](https://github.com/casey/just/pull/1513) by [casey](https://github.com/casey)) - Put default setting values in backticks ([#1512](https://github.com/casey/just/pull/1512) by [s1ck](https://github.com/s1ck)) - Use lowercase boolean literals in readme ([#1511](https://github.com/casey/just/pull/1511) by [s1ck](https://github.com/s1ck)) -- Document invocation_directory_native() ([#1508](https://github.com/casey/just/pull/1508)) -- Fix interrupt tests ([#1505](https://github.com/casey/just/pull/1505)) +- Document invocation_directory_native() ([#1508](https://github.com/casey/just/pull/1508) by [casey](https://github.com/casey)) +- Fix interrupt tests ([#1505](https://github.com/casey/just/pull/1505) by [casey](https://github.com/casey)) [1.12.0](https://github.com/casey/just/releases/tag/1.12.0) - 2023-01-12 ------------------------------------------------------------------------ @@ -404,16 +404,16 @@ Changelog ### Changed - Allow matching search path arguments ([#1475](https://github.com/casey/just/pull/1475) by [neunenak](https://github.com/neunenak)) -- Allow recipe parameters to shadow variables ([#1480](https://github.com/casey/just/pull/1480)) +- Allow recipe parameters to shadow variables ([#1480](https://github.com/casey/just/pull/1480) by [casey](https://github.com/casey)) ### Misc -- Remove --unstable from fallback example in readme ([#1502](https://github.com/casey/just/pull/1502)) +- Remove --unstable from fallback example in readme ([#1502](https://github.com/casey/just/pull/1502) by [casey](https://github.com/casey)) - Specify minimum rust version ([#1496](https://github.com/casey/just/pull/1496) by [benmoss](https://github.com/benmoss)) -- Note that install.sh may fail on GitHub actions ([#1499](https://github.com/casey/just/pull/1499)) +- Note that install.sh may fail on GitHub actions ([#1499](https://github.com/casey/just/pull/1499) by [casey](https://github.com/casey)) - Fix readme typo ([#1489](https://github.com/casey/just/pull/1489) by [auberisky](https://github.com/auberisky)) -- Update install script and readmes to use tls v1.3 ([#1481](https://github.com/casey/just/pull/1481)) -- Re-enable install.sh test on CI([#1478](https://github.com/casey/just/pull/1478)) -- Don't test install.sh on CI ([#1477](https://github.com/casey/just/pull/1477)) +- Update install script and readmes to use tls v1.3 ([#1481](https://github.com/casey/just/pull/1481) by [casey](https://github.com/casey)) +- Re-enable install.sh test on CI([#1478](https://github.com/casey/just/pull/1478) by [casey](https://github.com/casey)) +- Don't test install.sh on CI ([#1477](https://github.com/casey/just/pull/1477) by [casey](https://github.com/casey)) - Update Chinese translation of readme ([#1476](https://github.com/casey/just/pull/1476) by [hustcer](https://github.com/hustcer)) - Fix install.sh for Windows ([#1474](https://github.com/casey/just/pull/1474) by [bloodearnest](https://github.com/bloodearnest)) @@ -421,7 +421,7 @@ Changelog ------------------------------------------------------------------------ ### Added -- Stabilize fallback ([#1471](https://github.com/casey/just/pull/1471)) +- Stabilize fallback ([#1471](https://github.com/casey/just/pull/1471) by [casey](https://github.com/casey)) ### Misc - Update Sublime syntax instructions ([#1455](https://github.com/casey/just/pull/1455) by [nk9](https://github.com/nk9)) @@ -433,27 +433,27 @@ Changelog - Allow private attribute on aliases ([#1434](https://github.com/casey/just/pull/1434) by [neunenak](https://github.com/neunenak)) ### Changed -- Suppress --fmt --check diff if --quiet is passed ([#1457](https://github.com/casey/just/pull/1457)) +- Suppress --fmt --check diff if --quiet is passed ([#1457](https://github.com/casey/just/pull/1457) by [casey](https://github.com/casey)) ### Fixed -- Format exported variadic parameters correctly ([#1451](https://github.com/casey/just/pull/1451)) +- Format exported variadic parameters correctly ([#1451](https://github.com/casey/just/pull/1451) by [casey](https://github.com/casey)) ### Misc - Fix section title grammar ([#1466](https://github.com/casey/just/pull/1466) by [brettcannon](https://github.com/brettcannon)) - Give pages job write permissions([#1464](https://github.com/casey/just/pull/1464) by [jsoref](https://github.com/jsoref)) - Fix spelling ([#1463](https://github.com/casey/just/pull/1463) by [jsoref](https://github.com/jsoref)) -- Merge imports ([#1462](https://github.com/casey/just/pull/1462)) +- Merge imports ([#1462](https://github.com/casey/just/pull/1462) by [casey](https://github.com/casey)) - Add instructions for taiki-e/install-action ([#1459](https://github.com/casey/just/pull/1459) by [azzamsa](https://github.com/azzamsa)) - Differentiate between shell and nushell example ([#1427](https://github.com/casey/just/pull/1427) by [Dialga](https://github.com/Dialga)) -- Link regex docs in readme ([#1454](https://github.com/casey/just/pull/1454)) +- Link regex docs in readme ([#1454](https://github.com/casey/just/pull/1454) by [casey](https://github.com/casey)) - Linkify changelog PRs and usernames ([#1440](https://github.com/casey/just/pull/1440) by [nk9](https://github.com/nk9)) - Eliminate lazy_static ([#1442](https://github.com/casey/just/pull/1442) by [camsteffen](https://github.com/camsteffen)) - Add attributes to sublime syntax file ([#1452](https://github.com/casey/just/pull/1452) by [crdx](https://github.com/crdx)) -- Fix homepage style ([#1453](https://github.com/casey/just/pull/1453)) +- Fix homepage style ([#1453](https://github.com/casey/just/pull/1453) by [casey](https://github.com/casey)) - Linkify homepage letters ([#1448](https://github.com/casey/just/pull/1448) by [nk9](https://github.com/nk9)) - Use `just` in readme codeblocks ([#1447](https://github.com/casey/just/pull/1447) by [nicochatzi](https://github.com/nicochatzi)) -- Update MSRV in readme ([#1446](https://github.com/casey/just/pull/1446)) -- Merge CI workflows ([#1444](https://github.com/casey/just/pull/1444)) +- Update MSRV in readme ([#1446](https://github.com/casey/just/pull/1446) by [casey](https://github.com/casey)) +- Merge CI workflows ([#1444](https://github.com/casey/just/pull/1444) by [casey](https://github.com/casey)) - Use dotenvy instead of dotenv ([#1443](https://github.com/casey/just/pull/1443) by [mike-burns](https://github.com/mike-burns)) - Update Chinese translation of readme ([#1428](https://github.com/casey/just/pull/1428) by [hustcer](https://github.com/hustcer)) @@ -461,40 +461,40 @@ Changelog ---------------------------------------------------------------------- ### Breaking Changes to Unstable Features -- Change `fallback` setting default to false ([#1425](https://github.com/casey/just/pull/1425)) +- Change `fallback` setting default to false ([#1425](https://github.com/casey/just/pull/1425) by [casey](https://github.com/casey)) ### Added -- Hide recipes with `[private]` attribute ([#1422](https://github.com/casey/just/pull/1422)) +- Hide recipes with `[private]` attribute ([#1422](https://github.com/casey/just/pull/1422) by [casey](https://github.com/casey)) - Add replace_regex function ([#1393](https://github.com/casey/just/pull/1393) by [miles170](https://github.com/miles170)) -- Add [no-cd] attribute ([#1400](https://github.com/casey/just/pull/1400)) +- Add [no-cd] attribute ([#1400](https://github.com/casey/just/pull/1400) by [casey](https://github.com/casey)) ### Changed -- Omit shebang lines on Windows ([#1417](https://github.com/casey/just/pull/1417)) +- Omit shebang lines on Windows ([#1417](https://github.com/casey/just/pull/1417) by [casey](https://github.com/casey)) ### Misc -- Placate clippy ([#1423](https://github.com/casey/just/pull/1423)) -- Make include_shebang_line clearer ([#1418](https://github.com/casey/just/pull/1418)) -- Use more secure cURL options in install.sh ([#1416](https://github.com/casey/just/pull/1416)) -- Document how shebang recipes are executed ([#1412](https://github.com/casey/just/pull/1412)) -- Fix typo: regec → regex ([#1409](https://github.com/casey/just/pull/1409)) +- Placate clippy ([#1423](https://github.com/casey/just/pull/1423) by [casey](https://github.com/casey)) +- Make include_shebang_line clearer ([#1418](https://github.com/casey/just/pull/1418) by [casey](https://github.com/casey)) +- Use more secure cURL options in install.sh ([#1416](https://github.com/casey/just/pull/1416) by [casey](https://github.com/casey)) +- Document how shebang recipes are executed ([#1412](https://github.com/casey/just/pull/1412) by [casey](https://github.com/casey)) +- Fix typo: regec → regex ([#1409](https://github.com/casey/just/pull/1409) by [casey](https://github.com/casey)) - Use powershell.exe instead of pwsh.exe in readme ([#1394](https://github.com/casey/just/pull/1394) by [asdf8dfafjk](https://github.com/asdf8dfafjk)) -- Expand alternatives and prior art in readme ([#1401](https://github.com/casey/just/pull/1401)) -- Split up CI workflow ([#1399](https://github.com/casey/just/pull/1399)) +- Expand alternatives and prior art in readme ([#1401](https://github.com/casey/just/pull/1401) by [casey](https://github.com/casey)) +- Split up CI workflow ([#1399](https://github.com/casey/just/pull/1399) by [casey](https://github.com/casey)) [1.8.0](https://github.com/casey/just/releases/tag/1.8.0) - 2022-11-02 ---------------------------------------------------------------------- ### Added -- Add OS Configuration Attributes ([#1387](https://github.com/casey/just/pull/1387)) +- Add OS Configuration Attributes ([#1387](https://github.com/casey/just/pull/1387) by [casey](https://github.com/casey)) ### Misc -- Link to sclu1034/vscode-just in readme ([#1396](https://github.com/casey/just/pull/1396)) +- Link to sclu1034/vscode-just in readme ([#1396](https://github.com/casey/just/pull/1396) by [casey](https://github.com/casey)) [1.7.0](https://github.com/casey/just/releases/tag/1.7.0) - 2022-10-26 ---------------------------------------------------------------------- ### Breaking Changes to Unstable Features -- Make `fallback` setting default to true ([#1384](https://github.com/casey/just/pull/1384)) +- Make `fallback` setting default to true ([#1384](https://github.com/casey/just/pull/1384) by [casey](https://github.com/casey)) ### Added - Add more case-conversion functions ([#1383](https://github.com/casey/just/pull/1383) by [gVirtu](https://github.com/gVirtu)) @@ -503,32 +503,32 @@ Changelog - Add `capitalize(s)` function ([#1375](https://github.com/casey/just/pull/1375) by [femnad](https://github.com/femnad)) ### Misc -- Credit contributors in changelog ([#1385](https://github.com/casey/just/pull/1385)) +- Credit contributors in changelog ([#1385](https://github.com/casey/just/pull/1385) by [casey](https://github.com/casey)) - Update asdf just plugin repository ([#1380](https://github.com/casey/just/pull/1380) by [kachick](https://github.com/kachick)) -- Prepend commit messages with `- ` in changelog ([#1379](https://github.com/casey/just/pull/1379)) -- Fail publish if `master` is found in README.md ([#1378](https://github.com/casey/just/pull/1378)) -- Use for loop in capitalize implementation ([#1377](https://github.com/casey/just/pull/1377)) +- Prepend commit messages with `- ` in changelog ([#1379](https://github.com/casey/just/pull/1379) by [casey](https://github.com/casey)) +- Fail publish if `master` is found in README.md ([#1378](https://github.com/casey/just/pull/1378) by [casey](https://github.com/casey)) +- Use for loop in capitalize implementation ([#1377](https://github.com/casey/just/pull/1377) by [casey](https://github.com/casey)) [1.6.0](https://github.com/casey/just/releases/tag/1.6.0) - 2022-10-19 ---------------------------------------------------------------------- ### Breaking Changes to Unstable Features -- Require `set fallback := true` to enable recipe fallback ([#1368](https://github.com/casey/just/pull/1368)) +- Require `set fallback := true` to enable recipe fallback ([#1368](https://github.com/casey/just/pull/1368) by [casey](https://github.com/casey)) ### Changed -- Allow fallback with search directory ([#1348](https://github.com/casey/just/pull/1348)) +- Allow fallback with search directory ([#1348](https://github.com/casey/just/pull/1348) by [casey](https://github.com/casey)) ### Added -- Don't evaluate comments ([#1358](https://github.com/casey/just/pull/1358)) +- Don't evaluate comments ([#1358](https://github.com/casey/just/pull/1358) by [casey](https://github.com/casey)) - Add skip-comments setting ([#1333](https://github.com/casey/just/pull/1333) by [neunenak](https://github.com/neunenak)) - Allow bash completion to complete tasks in other directories ([#1303](https://github.com/casey/just/pull/1303) by [jpbochi](https://github.com/jpbochi)) ### Misc -- Restore www/CNAME ([#1364](https://github.com/casey/just/pull/1364)) -- Improve book config ([#1363](https://github.com/casey/just/pull/1363)) +- Restore www/CNAME ([#1364](https://github.com/casey/just/pull/1364) by [casey](https://github.com/casey)) +- Improve book config ([#1363](https://github.com/casey/just/pull/1363) by [casey](https://github.com/casey)) - Add kitchen sink justfile to test syntax highlighting ([#1362](https://github.com/casey/just/pull/1362) by [nk9](https://github.com/nk9)) -- Note version in which absolute path construction was added ([#1361](https://github.com/casey/just/pull/1361)) -- Inline setup and cleanup functions in completion script test ([#1352](https://github.com/casey/just/pull/1352)) +- Note version in which absolute path construction was added ([#1361](https://github.com/casey/just/pull/1361) by [casey](https://github.com/casey)) +- Inline setup and cleanup functions in completion script test ([#1352](https://github.com/casey/just/pull/1352) by [casey](https://github.com/casey)) [1.5.0](https://github.com/casey/just/releases/tag/1.5.0) - 2022-9-11 --------------------------------------------------------------------- @@ -537,11 +537,11 @@ Changelog - Allow constructing absolute paths with `/` operator ([#1320](https://github.com/casey/just/pull/1320) by [erikkrieg](https://github.com/erikkrieg)) ### Misc -- Allow fewer lints ([#1340](https://github.com/casey/just/pull/1340)) +- Allow fewer lints ([#1340](https://github.com/casey/just/pull/1340) by [casey](https://github.com/casey)) - Fix issues reported by nightly clippy ([#1336](https://github.com/casey/just/pull/1336) by [neunenak](https://github.com/neunenak)) - Refactor run.rs ([#1335](https://github.com/casey/just/pull/1335) by [neunenak](https://github.com/neunenak)) -- Allow comments on same line as settings ([#1339](https://github.com/casey/just/pull/1339)) -- Fix justfile env shebang on Linux ([#1330](https://github.com/casey/just/pull/1330)) +- Allow comments on same line as settings ([#1339](https://github.com/casey/just/pull/1339) by [casey](https://github.com/casey)) +- Fix justfile env shebang on Linux ([#1330](https://github.com/casey/just/pull/1330) by [casey](https://github.com/casey)) - Update Chinese translation of README.md ([#1325](https://github.com/casey/just/pull/1325) by [hustcer](https://github.com/hustcer)) - Add additional settings to grammar - Add an example of using a variable in a recipe parameter ([#1311](https://github.com/casey/just/pull/1311) by [papertigers](https://github.com/papertigers)) @@ -550,29 +550,29 @@ Changelog --------------------------------------------------------------------- ### Fixed -- Fix shell setting precedence ([#1306](https://github.com/casey/just/pull/1306)) +- Fix shell setting precedence ([#1306](https://github.com/casey/just/pull/1306) by [casey](https://github.com/casey)) ### Misc -- Don't hardcode homebrew prefix ([#1295](https://github.com/casey/just/pull/1295)) -- Exclude files from cargo package ([#1283](https://github.com/casey/just/pull/1283)) +- Don't hardcode homebrew prefix ([#1295](https://github.com/casey/just/pull/1295) by [casey](https://github.com/casey)) +- Exclude files from cargo package ([#1283](https://github.com/casey/just/pull/1283) by [casey](https://github.com/casey)) - Add usage note to default list recipe ([#1296](https://github.com/casey/just/pull/1296) by [jpbochi](https://github.com/jpbochi)) - Add MPR/Prebuilt-MPR installation instructions to README.md ([#1280](https://github.com/casey/just/pull/1280) by [hwittenborn](https://github.com/hwittenborn)) -- Add make and makesure to readme ([#1299](https://github.com/casey/just/pull/1299)) +- Add make and makesure to readme ([#1299](https://github.com/casey/just/pull/1299) by [casey](https://github.com/casey)) - Document how to configure zsh completions on MacOS ([#1285](https://github.com/casey/just/pull/1285) by [nk9](https://github.com/nk9)) -- Convert package table to HTML ([#1291](https://github.com/casey/just/pull/1291)) +- Convert package table to HTML ([#1291](https://github.com/casey/just/pull/1291) by [casey](https://github.com/casey)) [1.3.0](https://github.com/casey/just/releases/tag/1.3.0) - 2022-7-25 --------------------------------------------------------------------- ### Added -- Add `/` operator ([#1237](https://github.com/casey/just/pull/1237)) +- Add `/` operator ([#1237](https://github.com/casey/just/pull/1237) by [casey](https://github.com/casey)) ### Fixed -- Fix multibyte codepoint crash ([#1243](https://github.com/casey/just/pull/1243)) +- Fix multibyte codepoint crash ([#1243](https://github.com/casey/just/pull/1243) by [casey](https://github.com/casey)) ### Misc - Update just-install reference on README.md ([#1275](https://github.com/casey/just/pull/1275) by [0xradical](https://github.com/0xradical)) -- Split Recipe::run into Recipe::{run_shebang,run_linewise} ([#1270](https://github.com/casey/just/pull/1270)) +- Split Recipe::run into Recipe::{run_shebang,run_linewise} ([#1270](https://github.com/casey/just/pull/1270) by [casey](https://github.com/casey)) - Add asdf package to readme([#1264](https://github.com/casey/just/pull/1264) by [jaacko-torus](https://github.com/jaacko-torus)) - Add mdbook deps for build-book recipe ([#1259](https://github.com/casey/just/pull/1259) by [TopherIsSwell](https://github.com/TopherIsSwell)) - Fix typo: argumant -> argument ([#1257](https://github.com/casey/just/pull/1257) by [kianmeng](https://github.com/kianmeng)) @@ -581,24 +581,24 @@ Changelog - Update Chinese translation of README.md ([#1253](https://github.com/casey/just/pull/1253) by [hustcer](https://github.com/hustcer)) - Improvements to Sublime syntax file ([#1250](https://github.com/casey/just/pull/1250) by [nk9](https://github.com/nk9)) - Prevent unbounded recursion when parsing expressions ([#1248](https://github.com/casey/just/pull/1248) by [evanrichter](https://github.com/evanrichter)) -- Publish to snap store ([#1245](https://github.com/casey/just/pull/1245)) +- Publish to snap store ([#1245](https://github.com/casey/just/pull/1245) by [casey](https://github.com/casey)) - Restore fuzz test harness ([#1246](https://github.com/casey/just/pull/1246) by [evanrichter](https://github.com/evanrichter)) - Add just-install to README file ([#1241](https://github.com/casey/just/pull/1241) by [brombal](https://github.com/brombal)) - Fix dead readme link ([#1240](https://github.com/casey/just/pull/1240) by [wdroz](https://github.com/wdroz)) -- Do `use super::*;` instead of `use crate::common::*;` ([#1239](https://github.com/casey/just/pull/1239)) -- Fix readme punctuation ([#1235](https://github.com/casey/just/pull/1235)) -- Add argument splitting section to readme ([#1230](https://github.com/casey/just/pull/1230)) -- Add notes about environment variables to readme ([#1229](https://github.com/casey/just/pull/1229)) -- Fix book links ([#1227](https://github.com/casey/just/pull/1227)) +- Do `use super::*;` instead of `use crate::common::*;` ([#1239](https://github.com/casey/just/pull/1239) by [casey](https://github.com/casey)) +- Fix readme punctuation ([#1235](https://github.com/casey/just/pull/1235) by [casey](https://github.com/casey)) +- Add argument splitting section to readme ([#1230](https://github.com/casey/just/pull/1230) by [casey](https://github.com/casey)) +- Add notes about environment variables to readme ([#1229](https://github.com/casey/just/pull/1229) by [casey](https://github.com/casey)) +- Fix book links ([#1227](https://github.com/casey/just/pull/1227) by [casey](https://github.com/casey)) - Add nushell README.md ([#1224](https://github.com/casey/just/pull/1224) by [hustcer](https://github.com/hustcer)) -- Use absolute links in readme ([#1223](https://github.com/casey/just/pull/1223)) -- Copy changelog into manual ([#1222](https://github.com/casey/just/pull/1222)) +- Use absolute links in readme ([#1223](https://github.com/casey/just/pull/1223) by [casey](https://github.com/casey)) +- Copy changelog into manual ([#1222](https://github.com/casey/just/pull/1222) by [casey](https://github.com/casey)) - Translate Chinese manual introduction and title ([#1220](https://github.com/casey/just/pull/1220) by [hustcer](https://github.com/hustcer)) -- Build Chinese language user manual ([#1219](https://github.com/casey/just/pull/1219)) +- Build Chinese language user manual ([#1219](https://github.com/casey/just/pull/1219) by [casey](https://github.com/casey)) - Update Chinese translation of README.md ([#1218](https://github.com/casey/just/pull/1218) by [hustcer](https://github.com/hustcer)) - Translate all of README.md into Chinese ([#1217](https://github.com/casey/just/pull/1217) by [hustcer](https://github.com/hustcer)) - Translate all of features in README into Chinese ([#1215](https://github.com/casey/just/pull/1215) by [hustcer](https://github.com/hustcer)) -- Make link to examples directory absolute ([#1213](https://github.com/casey/just/pull/1213)) +- Make link to examples directory absolute ([#1213](https://github.com/casey/just/pull/1213) by [casey](https://github.com/casey)) - Translate part of features in README into Chinese ([#1211](https://github.com/casey/just/pull/1211) by [hustcer](https://github.com/hustcer)) - Add JetBrains IDE plugin to readme ([#1209](https://github.com/casey/just/pull/1209) by [linux-china](https://github.com/linux-china)) - Translate features chapter of readme to Chinese ([#1208](https://github.com/casey/just/pull/1208) by [hustcer](https://github.com/hustcer)) @@ -607,51 +607,51 @@ Changelog --------------------------------------------------------------------- ### Added -- Add `windows-shell` setting ([#1198](https://github.com/casey/just/pull/1198)) +- Add `windows-shell` setting ([#1198](https://github.com/casey/just/pull/1198) by [casey](https://github.com/casey)) - SHA-256 and UUID functions ([#1170](https://github.com/casey/just/pull/1170) by [mbodmer](https://github.com/mbodmer)) ### Misc - Translate editor support and quick start to Chinese ([#1206](https://github.com/casey/just/pull/1206) by [hustcer](https://github.com/hustcer)) - Translate first section of readme into Chinese ([#1205](https://github.com/casey/just/pull/1205) by [hustcer](https://github.com/hustcer)) -- Fix a bunch of typos ([#1204](https://github.com/casey/just/pull/1204)) -- Remove cargo-limit usage from justfile ([#1199](https://github.com/casey/just/pull/1199)) +- Fix a bunch of typos ([#1204](https://github.com/casey/just/pull/1204) by [casey](https://github.com/casey)) +- Remove cargo-limit usage from justfile ([#1199](https://github.com/casey/just/pull/1199) by [casey](https://github.com/casey)) - Add nix package manager install instructions ([#1194](https://github.com/casey/just/pull/1194) by [risingBirdSong](https://github.com/risingBirdSong)) - Fix broken link in readme ([#1183](https://github.com/casey/just/pull/1183) by [Vlad-Shcherbina](https://github.com/Vlad-Shcherbina)) -- Add screenshot to manual ([#1181](https://github.com/casey/just/pull/1181)) -- Style homepage ([#1180](https://github.com/casey/just/pull/1180)) -- Center readme ([#1178](https://github.com/casey/just/pull/1178)) -- Style and add links to homepage ([#1177](https://github.com/casey/just/pull/1177)) -- Fix readme badge links ([#1176](https://github.com/casey/just/pull/1176)) -- Generate book from readme ([#1155](https://github.com/casey/just/pull/1155)) +- Add screenshot to manual ([#1181](https://github.com/casey/just/pull/1181) by [casey](https://github.com/casey)) +- Style homepage ([#1180](https://github.com/casey/just/pull/1180) by [casey](https://github.com/casey)) +- Center readme ([#1178](https://github.com/casey/just/pull/1178) by [casey](https://github.com/casey)) +- Style and add links to homepage ([#1177](https://github.com/casey/just/pull/1177) by [casey](https://github.com/casey)) +- Fix readme badge links ([#1176](https://github.com/casey/just/pull/1176) by [casey](https://github.com/casey)) +- Generate book from readme ([#1155](https://github.com/casey/just/pull/1155) by [casey](https://github.com/casey)) [1.1.3](https://github.com/casey/just/releases/tag/1.1.3) - 2022-5-3 -------------------------------------------------------------------- ### Fixed -- Skip duplicate recipe arguments ([#1174](https://github.com/casey/just/pull/1174)) +- Skip duplicate recipe arguments ([#1174](https://github.com/casey/just/pull/1174) by [casey](https://github.com/casey)) ### Misc -- Fix install script ([#1172](https://github.com/casey/just/pull/1172)) -- Document that `invocation_directory()` returns an absolute path ([#1162](https://github.com/casey/just/pull/1162)) -- Fix absolute_path documentation ([#1160](https://github.com/casey/just/pull/1160)) +- Fix install script ([#1172](https://github.com/casey/just/pull/1172) by [casey](https://github.com/casey)) +- Document that `invocation_directory()` returns an absolute path ([#1162](https://github.com/casey/just/pull/1162) by [casey](https://github.com/casey)) +- Fix absolute_path documentation ([#1160](https://github.com/casey/just/pull/1160) by [casey](https://github.com/casey)) - Add cross-platform justfile example ([#1152](https://github.com/casey/just/pull/1152) by [presidento](https://github.com/presidento)) [1.1.2](https://github.com/casey/just/releases/tag/1.1.2) - 2022-3-30 --------------------------------------------------------------------- ### Misc -- Document indentation rules ([#1142](https://github.com/casey/just/pull/1142)) -- Remove stale link from readme ([#1141](https://github.com/casey/just/pull/1141)) +- Document indentation rules ([#1142](https://github.com/casey/just/pull/1142) by [casey](https://github.com/casey)) +- Remove stale link from readme ([#1141](https://github.com/casey/just/pull/1141) by [casey](https://github.com/casey)) ### Unstable -- Search for missing recipes in parent directory justfiles ([#1149](https://github.com/casey/just/pull/1149)) +- Search for missing recipes in parent directory justfiles ([#1149](https://github.com/casey/just/pull/1149) by [casey](https://github.com/casey)) [1.1.1](https://github.com/casey/just/releases/tag/1.1.1) - 2022-3-22 --------------------------------------------------------------------- ### Misc -- Build MacOS ARM release binaries ([#1138](https://github.com/casey/just/pull/1138)) -- Upgrade Windows Actions runners to windows-latest ([#1137](https://github.com/casey/just/pull/1137)) +- Build MacOS ARM release binaries ([#1138](https://github.com/casey/just/pull/1138) by [casey](https://github.com/casey)) +- Upgrade Windows Actions runners to windows-latest ([#1137](https://github.com/casey/just/pull/1137) by [casey](https://github.com/casey)) [1.1.0](https://github.com/casey/just/releases/tag/1.1.0) - 2022-3-10 --------------------------------------------------------------------- @@ -664,12 +664,12 @@ Changelog --------------------------------------------------------------------- ### Fixed -- Make path_exists() relative to current directory ([#1122](https://github.com/casey/just/pull/1122)) +- Make path_exists() relative to current directory ([#1122](https://github.com/casey/just/pull/1122) by [casey](https://github.com/casey)) ### Misc - Detail environment variable usage in readme ([#1086](https://github.com/casey/just/pull/1086) by [kenden](https://github.com/kenden)) - Format --init justfile ([#1116](https://github.com/casey/just/pull/1116) by [TheLocehiliosan](https://github.com/TheLocehiliosan)) -- Add hint for Node.js script compatibility ([#1113](https://github.com/casey/just/pull/1113)) +- Add hint for Node.js script compatibility ([#1113](https://github.com/casey/just/pull/1113) by [casey](https://github.com/casey)) [1.0.0](https://github.com/casey/just/releases/tag/1.0.0) - 2022-2-22 --------------------------------------------------------------------- @@ -678,13 +678,13 @@ Changelog - Add path_exists() function ([#1106](https://github.com/casey/just/pull/1106) by [heavelock](https://github.com/heavelock)) ### Misc -- Note that `pipefail` isn't normally set ([#1108](https://github.com/casey/just/pull/1108)) +- Note that `pipefail` isn't normally set ([#1108](https://github.com/casey/just/pull/1108) by [casey](https://github.com/casey)) [0.11.2](https://github.com/casey/just/releases/tag/0.11.2) - 2022-2-15 ----------------------------------------------------------------------- ### Misc -- Fix dotenv-load documentation ([#1104](https://github.com/casey/just/pull/1104)) +- Fix dotenv-load documentation ([#1104](https://github.com/casey/just/pull/1104) by [casey](https://github.com/casey)) - Fixup broken release package script ([#1100](https://github.com/casey/just/pull/1100) by [lutostag](https://github.com/lutostag)) [0.11.1](https://github.com/casey/just/releases/tag/0.11.1) - 2022-2-14 @@ -694,25 +694,25 @@ Changelog - Allow duplicate recipes ([#1095](https://github.com/casey/just/pull/1095) by [lutostag](https://github.com/lutostag)) ### Misc -- Add arrow pointing to table of contents button ([#1096](https://github.com/casey/just/pull/1096)) +- Add arrow pointing to table of contents button ([#1096](https://github.com/casey/just/pull/1096) by [casey](https://github.com/casey)) - Improve readme ([#1093](https://github.com/casey/just/pull/1093) by [halostatue](https://github.com/halostatue)) -- Remove asciidoc readme ([#1092](https://github.com/casey/just/pull/1092)) -- Convert README.adoc to markdown ([#1091](https://github.com/casey/just/pull/1091)) +- Remove asciidoc readme ([#1092](https://github.com/casey/just/pull/1092) by [casey](https://github.com/casey)) +- Convert README.adoc to markdown ([#1091](https://github.com/casey/just/pull/1091) by [casey](https://github.com/casey)) - Add choco package to README ([#1090](https://github.com/casey/just/pull/1090) by [michidk](https://github.com/michidk)) [0.11.0](https://github.com/casey/just/releases/tag/0.11.0) - 2022-2-3 ---------------------------------------------------------------------- ### Breaking -- Change dotenv-load default to false ([#1082](https://github.com/casey/just/pull/1082)) +- Change dotenv-load default to false ([#1082](https://github.com/casey/just/pull/1082) by [casey](https://github.com/casey)) [0.10.7](https://github.com/casey/just/releases/tag/0.10.7) - 2022-1-30 ----------------------------------------------------------------------- ### Misc -- Don't run tests in release workflow ([#1080](https://github.com/casey/just/pull/1080)) -- Fix windows chooser invocation error message test ([#1079](https://github.com/casey/just/pull/1079)) -- Remove call to sed in justfile ([#1078](https://github.com/casey/just/pull/1078)) +- Don't run tests in release workflow ([#1080](https://github.com/casey/just/pull/1080) by [casey](https://github.com/casey)) +- Fix windows chooser invocation error message test ([#1079](https://github.com/casey/just/pull/1079) by [casey](https://github.com/casey)) +- Remove call to sed in justfile ([#1078](https://github.com/casey/just/pull/1078) by [casey](https://github.com/casey)) [0.10.6](https://github.com/casey/just/releases/tag/0.10.6) - 2022-1-29 ----------------------------------------------------------------------- @@ -721,84 +721,84 @@ Changelog - Add windows-powershell setting ([#1057](https://github.com/casey/just/pull/1057) by [michidk](https://github.com/michidk)) ### Changed -- Allow using `-` and `@` in any order ([#1063](https://github.com/casey/just/pull/1063)) +- Allow using `-` and `@` in any order ([#1063](https://github.com/casey/just/pull/1063) by [casey](https://github.com/casey)) ### Misc -- Use `Context` suffix for snafu error contexts ([#1068](https://github.com/casey/just/pull/1068)) +- Use `Context` suffix for snafu error contexts ([#1068](https://github.com/casey/just/pull/1068) by [casey](https://github.com/casey)) - Upgrade snafu to 0.7 ([#1067](https://github.com/casey/just/pull/1067) by [shepmaster](https://github.com/shepmaster)) - Mention "$@" in the README ([#1064](https://github.com/casey/just/pull/1064) by [mpdude](https://github.com/mpdude)) - Note how to use PowerShell with CLI in readme ([#1056](https://github.com/casey/just/pull/1056) by [michidk](https://github.com/michidk)) -- Link to cheatsheet from readme ([#1053](https://github.com/casey/just/pull/1053)) +- Link to cheatsheet from readme ([#1053](https://github.com/casey/just/pull/1053) by [casey](https://github.com/casey)) - Link to Homebrew installation docs in readme ([#1049](https://github.com/casey/just/pull/1049) by [michidk](https://github.com/michidk)) -- Workflow tweaks ([#1045](https://github.com/casey/just/pull/1045)) -- Push to correct origin in publish recipe ([#1044](https://github.com/casey/just/pull/1044)) +- Workflow tweaks ([#1045](https://github.com/casey/just/pull/1045) by [casey](https://github.com/casey)) +- Push to correct origin in publish recipe ([#1044](https://github.com/casey/just/pull/1044) by [casey](https://github.com/casey)) [0.10.5](https://github.com/casey/just/releases/tag/0.10.5) - 2021-12-4 ----------------------------------------------------------------------- ### Changed -- Use musl libc for ARM binaries ([#1037](https://github.com/casey/just/pull/1037)) +- Use musl libc for ARM binaries ([#1037](https://github.com/casey/just/pull/1037) by [casey](https://github.com/casey)) ### Misc - Make completions work with Bash alias ([#1035](https://github.com/casey/just/pull/1035) by [kurtbuilds](https://github.com/kurtbuilds)) -- Run tests on PRs ([#1040](https://github.com/casey/just/pull/1040)) -- Improve GitHub Actions workflow triggers ([#1033](https://github.com/casey/just/pull/1033)) -- Publish from GitHub master branch instead of local master ([#1032](https://github.com/casey/just/pull/1032)) +- Run tests on PRs ([#1040](https://github.com/casey/just/pull/1040) by [casey](https://github.com/casey)) +- Improve GitHub Actions workflow triggers ([#1033](https://github.com/casey/just/pull/1033) by [casey](https://github.com/casey)) +- Publish from GitHub master branch instead of local master ([#1032](https://github.com/casey/just/pull/1032) by [casey](https://github.com/casey)) [0.10.4](https://github.com/casey/just/releases/tag/0.10.4) - 2021-11-21 ------------------------------------------------------------------------ ### Added -- Add `--dump-format json` ([#992](https://github.com/casey/just/pull/992)) -- Add `quote(s)` function for escaping strings ([#1022](https://github.com/casey/just/pull/1022)) +- Add `--dump-format json` ([#992](https://github.com/casey/just/pull/992) by [casey](https://github.com/casey)) +- Add `quote(s)` function for escaping strings ([#1022](https://github.com/casey/just/pull/1022) by [casey](https://github.com/casey)) - fmt: check formatting with `--check` ([#1001](https://github.com/casey/just/pull/1001) by [hdhoang](https://github.com/hdhoang)) ### Misc -- Refactor github actions ([#1028](https://github.com/casey/just/pull/1028)) +- Refactor github actions ([#1028](https://github.com/casey/just/pull/1028) by [casey](https://github.com/casey)) - Fix readme formatting ([#1030](https://github.com/casey/just/pull/1030) by [soenkehahn](https://github.com/soenkehahn)) - Use ps1 extension for pwsh shebangs ([#1027](https://github.com/casey/just/pull/1027) by [dmringo](https://github.com/dmringo)) -- Ignore leading byte order mark in source files ([#1021](https://github.com/casey/just/pull/1021)) -- Add color to `just --fmt --check` diff ([#1015](https://github.com/casey/just/pull/1015)) +- Ignore leading byte order mark in source files ([#1021](https://github.com/casey/just/pull/1021) by [casey](https://github.com/casey)) +- Add color to `just --fmt --check` diff ([#1015](https://github.com/casey/just/pull/1015) by [casey](https://github.com/casey)) [0.10.3](https://github.com/casey/just/releases/tag/0.10.3) - 2021-10-30 ------------------------------------------------------------------------ ### Added -- Add `trim_end(s)` and `trim_start(s)` functions ([#999](https://github.com/casey/just/pull/999)) -- Add more string manipulation functions ([#998](https://github.com/casey/just/pull/998)) +- Add `trim_end(s)` and `trim_start(s)` functions ([#999](https://github.com/casey/just/pull/999) by [casey](https://github.com/casey)) +- Add more string manipulation functions ([#998](https://github.com/casey/just/pull/998) by [casey](https://github.com/casey)) ### Changed -- Make `join` accept two or more arguments ([#1000](https://github.com/casey/just/pull/1000)) +- Make `join` accept two or more arguments ([#1000](https://github.com/casey/just/pull/1000) by [casey](https://github.com/casey)) ### Misc -- Add alternatives and prior art section to readme ([#1008](https://github.com/casey/just/pull/1008)) +- Add alternatives and prior art section to readme ([#1008](https://github.com/casey/just/pull/1008) by [casey](https://github.com/casey)) - Fix readme `make`'s not correctly displayed ([#1007](https://github.com/casey/just/pull/1007) by [peter50216](https://github.com/peter50216)) -- Document the default recipe ([#1006](https://github.com/casey/just/pull/1006)) -- Document creating user justfile recipe aliases ([#1005](https://github.com/casey/just/pull/1005)) +- Document the default recipe ([#1006](https://github.com/casey/just/pull/1006) by [casey](https://github.com/casey)) +- Document creating user justfile recipe aliases ([#1005](https://github.com/casey/just/pull/1005) by [casey](https://github.com/casey)) - Fix readme typo ([#1004](https://github.com/casey/just/pull/1004) by [0xflotus](https://github.com/0xflotus)) -- Add packaging status table to readme ([#1003](https://github.com/casey/just/pull/1003)) +- Add packaging status table to readme ([#1003](https://github.com/casey/just/pull/1003) by [casey](https://github.com/casey)) - Reword `sh` not found error messages ([#1002](https://github.com/casey/just/pull/1002) by [hdhoang](https://github.com/hdhoang)) -- Only pass +crt-static to cargo build ([#997](https://github.com/casey/just/pull/997)) -- Stop using tabs in justfile in editorconfig ([#996](https://github.com/casey/just/pull/996)) -- Use consistent rustflags formatting ([#994](https://github.com/casey/just/pull/994)) -- Use `cargo build` instead of `cargo rustc` ([#993](https://github.com/casey/just/pull/993)) -- Don't skip variables in variable iterator ([#991](https://github.com/casey/just/pull/991)) -- Remove deprecated equals error ([#985](https://github.com/casey/just/pull/985)) +- Only pass +crt-static to cargo build ([#997](https://github.com/casey/just/pull/997) by [casey](https://github.com/casey)) +- Stop using tabs in justfile in editorconfig ([#996](https://github.com/casey/just/pull/996) by [casey](https://github.com/casey)) +- Use consistent rustflags formatting ([#994](https://github.com/casey/just/pull/994) by [casey](https://github.com/casey)) +- Use `cargo build` instead of `cargo rustc` ([#993](https://github.com/casey/just/pull/993) by [casey](https://github.com/casey)) +- Don't skip variables in variable iterator ([#991](https://github.com/casey/just/pull/991) by [casey](https://github.com/casey)) +- Remove deprecated equals error ([#985](https://github.com/casey/just/pull/985) by [casey](https://github.com/casey)) [0.10.2](https://github.com/casey/just/releases/tag/0.10.2) - 2021-9-26 ----------------------------------------------------------------------- ### Added -- Implement regular expression match conditionals ([#970](https://github.com/casey/just/pull/970)) +- Implement regular expression match conditionals ([#970](https://github.com/casey/just/pull/970) by [casey](https://github.com/casey)) ### Misc -- Add detailed instructions for installing prebuilt binaries ([#978](https://github.com/casey/just/pull/978)) -- Improve readme package table formatting ([#977](https://github.com/casey/just/pull/977)) +- Add detailed instructions for installing prebuilt binaries ([#978](https://github.com/casey/just/pull/978) by [casey](https://github.com/casey)) +- Improve readme package table formatting ([#977](https://github.com/casey/just/pull/977) by [casey](https://github.com/casey)) - Add conda package to README ([#976](https://github.com/casey/just/pull/976) by [kellpossible](https://github.com/kellpossible)) -- Change MSRV to 1.46.0 ([#968](https://github.com/casey/just/pull/968)) -- Use stable rustfmt instead of nightly ([#967](https://github.com/casey/just/pull/967)) -- Fix readme typo: FOO → WORLD ([#964](https://github.com/casey/just/pull/964)) -- Reword Emacs section in readme ([#962](https://github.com/casey/just/pull/962)) +- Change MSRV to 1.46.0 ([#968](https://github.com/casey/just/pull/968) by [casey](https://github.com/casey)) +- Use stable rustfmt instead of nightly ([#967](https://github.com/casey/just/pull/967) by [casey](https://github.com/casey)) +- Fix readme typo: FOO → WORLD ([#964](https://github.com/casey/just/pull/964) by [casey](https://github.com/casey)) +- Reword Emacs section in readme ([#962](https://github.com/casey/just/pull/962) by [casey](https://github.com/casey)) - Mention justl mode for Emacs ([#961](https://github.com/casey/just/pull/961) by [psibi](https://github.com/psibi)) [0.10.1](https://github.com/casey/just/releases/tag/0.10.1) - 2021-8-27 @@ -808,62 +808,62 @@ Changelog - Add flags for specifying name and path to environment file ([#941](https://github.com/casey/just/pull/941) by [Celeo](https://github.com/Celeo)) ### Misc -- Fix error message tests for Alpine Linux ([#956](https://github.com/casey/just/pull/956)) -- Bump `target` version to 2.0 ([#957](https://github.com/casey/just/pull/957)) -- Mention `tree-sitter-just` in readme ([#951](https://github.com/casey/just/pull/951)) -- Document release RSS feed in readme ([#950](https://github.com/casey/just/pull/950)) +- Fix error message tests for Alpine Linux ([#956](https://github.com/casey/just/pull/956) by [casey](https://github.com/casey)) +- Bump `target` version to 2.0 ([#957](https://github.com/casey/just/pull/957) by [casey](https://github.com/casey)) +- Mention `tree-sitter-just` in readme ([#951](https://github.com/casey/just/pull/951) by [casey](https://github.com/casey)) +- Document release RSS feed in readme ([#950](https://github.com/casey/just/pull/950) by [casey](https://github.com/casey)) - Add installation instructions for Gentoo Linux ([#946](https://github.com/casey/just/pull/946) by [dm9pZCAq](https://github.com/dm9pZCAq)) -- Make GitHub Actions instructions more prominent ([#944](https://github.com/casey/just/pull/944)) -- Wrap `--help` text to terminal width ([#940](https://github.com/casey/just/pull/940)) -- Add `.justfile` to sublime syntax file_extensions ([#938](https://github.com/casey/just/pull/938)) -- Suggest using `~/.global.justfile` instead of `~/.justfile` ([#937](https://github.com/casey/just/pull/937)) -- Update man page ([#935](https://github.com/casey/just/pull/935)) +- Make GitHub Actions instructions more prominent ([#944](https://github.com/casey/just/pull/944) by [casey](https://github.com/casey)) +- Wrap `--help` text to terminal width ([#940](https://github.com/casey/just/pull/940) by [casey](https://github.com/casey)) +- Add `.justfile` to sublime syntax file_extensions ([#938](https://github.com/casey/just/pull/938) by [casey](https://github.com/casey)) +- Suggest using `~/.global.justfile` instead of `~/.justfile` ([#937](https://github.com/casey/just/pull/937) by [casey](https://github.com/casey)) +- Update man page ([#935](https://github.com/casey/just/pull/935) by [casey](https://github.com/casey)) [0.10.0](https://github.com/casey/just/releases/tag/0.10.0) - 2021-8-2 ---------------------------------------------------------------------- ### Changed -- Warn if `.env` file is loaded in `dotenv-load` isn't explicitly set ([#925](https://github.com/casey/just/pull/925)) +- Warn if `.env` file is loaded in `dotenv-load` isn't explicitly set ([#925](https://github.com/casey/just/pull/925) by [casey](https://github.com/casey)) ### Added -- Add `--changelog` subcommand ([#932](https://github.com/casey/just/pull/932)) -- Support `.justfile` as an alternative to `justfile` ([#931](https://github.com/casey/just/pull/931)) +- Add `--changelog` subcommand ([#932](https://github.com/casey/just/pull/932) by [casey](https://github.com/casey)) +- Support `.justfile` as an alternative to `justfile` ([#931](https://github.com/casey/just/pull/931) by [casey](https://github.com/casey)) ### Misc -- Use cargo-limit for all recipes ([#928](https://github.com/casey/just/pull/928)) -- Fix colors ([#927](https://github.com/casey/just/pull/927)) -- Use ColorDisplay trait to print objects to the terminal ([#926](https://github.com/casey/just/pull/926)) -- Deduplicate recipe parsing ([#923](https://github.com/casey/just/pull/923)) -- Move subcommand functions into Subcommand ([#918](https://github.com/casey/just/pull/918)) -- Check GitHub Actions workflow with actionlint ([#921](https://github.com/casey/just/pull/921)) -- Add loader and refactor errors ([#917](https://github.com/casey/just/pull/917)) -- Rename: Module → Ast ([#915](https://github.com/casey/just/pull/915)) +- Use cargo-limit for all recipes ([#928](https://github.com/casey/just/pull/928) by [casey](https://github.com/casey)) +- Fix colors ([#927](https://github.com/casey/just/pull/927) by [casey](https://github.com/casey)) +- Use ColorDisplay trait to print objects to the terminal ([#926](https://github.com/casey/just/pull/926) by [casey](https://github.com/casey)) +- Deduplicate recipe parsing ([#923](https://github.com/casey/just/pull/923) by [casey](https://github.com/casey)) +- Move subcommand functions into Subcommand ([#918](https://github.com/casey/just/pull/918) by [casey](https://github.com/casey)) +- Check GitHub Actions workflow with actionlint ([#921](https://github.com/casey/just/pull/921) by [casey](https://github.com/casey)) +- Add loader and refactor errors ([#917](https://github.com/casey/just/pull/917) by [casey](https://github.com/casey)) +- Rename: Module → Ast ([#915](https://github.com/casey/just/pull/915) by [casey](https://github.com/casey)) [0.9.9](https://github.com/casey/just/releases/tag/0.9.9) - 2021-7-22 --------------------------------------------------------------------- ### Added -- Add subsequent dependencies ([#820](https://github.com/casey/just/pull/820)) -- Implement `else if` chaining ([#910](https://github.com/casey/just/pull/910)) +- Add subsequent dependencies ([#820](https://github.com/casey/just/pull/820) by [casey](https://github.com/casey)) +- Implement `else if` chaining ([#910](https://github.com/casey/just/pull/910) by [casey](https://github.com/casey)) ### Fixed -- Fix circular variable dependency error message ([#909](https://github.com/casey/just/pull/909)) +- Fix circular variable dependency error message ([#909](https://github.com/casey/just/pull/909) by [casey](https://github.com/casey)) ### Misc - Improve readme ([#904](https://github.com/casey/just/pull/904) by [mtsknn](https://github.com/mtsknn)) -- Add screenshot to readme ([#911](https://github.com/casey/just/pull/911)) +- Add screenshot to readme ([#911](https://github.com/casey/just/pull/911) by [casey](https://github.com/casey)) - Add install instructions for Fedora Linux ([#898](https://github.com/casey/just/pull/898) by [olivierlemasle](https://github.com/olivierlemasle)) - Fix readme typos ([#903](https://github.com/casey/just/pull/903) by [rokf](https://github.com/rokf)) -- Actually fix release tagging and publish changelog with releases ([#901](https://github.com/casey/just/pull/901)) -- Fix broken prerelease tagging ([#900](https://github.com/casey/just/pull/900)) -- Use string value for ref-type check ([#897](https://github.com/casey/just/pull/897)) +- Actually fix release tagging and publish changelog with releases ([#901](https://github.com/casey/just/pull/901) by [casey](https://github.com/casey)) +- Fix broken prerelease tagging ([#900](https://github.com/casey/just/pull/900) by [casey](https://github.com/casey)) +- Use string value for ref-type check ([#897](https://github.com/casey/just/pull/897) by [casey](https://github.com/casey)) [0.9.8](https://github.com/casey/just/releases/tag/0.9.8) - 2021-7-3 -------------------------------------------------------------------- ### Misc -- Fix changelog formatting ([#894](https://github.com/casey/just/pull/894)) -- Only run install script on CI for non-releases ([#895](https://github.com/casey/just/pull/895)) +- Fix changelog formatting ([#894](https://github.com/casey/just/pull/894) by [casey](https://github.com/casey)) +- Only run install script on CI for non-releases ([#895](https://github.com/casey/just/pull/895) by [casey](https://github.com/casey)) [0.9.7](https://github.com/casey/just/releases/tag/0.9.7) - 2021-7-3 -------------------------------------------------------------------- @@ -872,52 +872,52 @@ Changelog - Add string manipulation functions ([#888](https://github.com/casey/just/pull/888) by [terror](https://github.com/terror)) ### Misc -- Remove test-utilities crate ([#892](https://github.com/casey/just/pull/892)) -- Remove outdated note in `Cargo.toml` ([#891](https://github.com/casey/just/pull/891)) -- Link to GitHub release pages in changelog ([#886](https://github.com/casey/just/pull/886)) +- Remove test-utilities crate ([#892](https://github.com/casey/just/pull/892) by [casey](https://github.com/casey)) +- Remove outdated note in `Cargo.toml` ([#891](https://github.com/casey/just/pull/891) by [casey](https://github.com/casey)) +- Link to GitHub release pages in changelog ([#886](https://github.com/casey/just/pull/886) by [casey](https://github.com/casey)) [0.9.6](https://github.com/casey/just/releases/tag/0.9.6) - 2021-6-24 --------------------------------------------------------------------- ### Added -- Add `clean` function for simplifying paths ([#883](https://github.com/casey/just/pull/883)) -- Add `join` function for joining paths ([#882](https://github.com/casey/just/pull/882)) +- Add `clean` function for simplifying paths ([#883](https://github.com/casey/just/pull/883) by [casey](https://github.com/casey)) +- Add `join` function for joining paths ([#882](https://github.com/casey/just/pull/882) by [casey](https://github.com/casey)) - Add path manipulation functions ([#872](https://github.com/casey/just/pull/872) by [TonioGela](https://github.com/TonioGela)) ### Misc - Add `file_extensions` to Sublime syntax file ([#878](https://github.com/casey/just/pull/878) by [Frederick888](https://github.com/Frederick888)) -- Document path manipulation functions in readme ([#877](https://github.com/casey/just/pull/877)) +- Document path manipulation functions in readme ([#877](https://github.com/casey/just/pull/877) by [casey](https://github.com/casey)) [0.9.5](https://github.com/casey/just/releases/tag/0.9.5) - 2021-6-12 --------------------------------------------------------------------- ### Added -- Add `--unstable` flag ([#869](https://github.com/casey/just/pull/869)) -- Add Sublime Text syntax file ([#864](https://github.com/casey/just/pull/864)) +- Add `--unstable` flag ([#869](https://github.com/casey/just/pull/869) by [casey](https://github.com/casey)) +- Add Sublime Text syntax file ([#864](https://github.com/casey/just/pull/864) by [casey](https://github.com/casey)) - Add `--fmt` subcommand ([#837](https://github.com/casey/just/pull/837) by [vglfr](https://github.com/vglfr)) ### Misc -- Mention doniogela.dev/just/ in readme ([#866](https://github.com/casey/just/pull/866)) -- Mention that vim-just is now available from vim-polyglot ([#865](https://github.com/casey/just/pull/865)) -- Mention `--list-heading` newline behavior ([#860](https://github.com/casey/just/pull/860)) -- Check for `rg` in `bin/forbid` ([#859](https://github.com/casey/just/pull/859)) -- Document that variables are not exported to backticks in the same scope ([#856](https://github.com/casey/just/pull/856)) -- Remove `dotenv_load` from tests ([#853](https://github.com/casey/just/pull/853)) -- Remove `v` prefix from version ([#850](https://github.com/casey/just/pull/850)) -- Improve install script ([#847](https://github.com/casey/just/pull/847)) -- Move pages assets back to `docs` ([#846](https://github.com/casey/just/pull/846)) -- Move pages assets to `www` ([#845](https://github.com/casey/just/pull/845)) +- Mention doniogela.dev/just/ in readme ([#866](https://github.com/casey/just/pull/866) by [casey](https://github.com/casey)) +- Mention that vim-just is now available from vim-polyglot ([#865](https://github.com/casey/just/pull/865) by [casey](https://github.com/casey)) +- Mention `--list-heading` newline behavior ([#860](https://github.com/casey/just/pull/860) by [casey](https://github.com/casey)) +- Check for `rg` in `bin/forbid` ([#859](https://github.com/casey/just/pull/859) by [casey](https://github.com/casey)) +- Document that variables are not exported to backticks in the same scope ([#856](https://github.com/casey/just/pull/856) by [casey](https://github.com/casey)) +- Remove `dotenv_load` from tests ([#853](https://github.com/casey/just/pull/853) by [casey](https://github.com/casey)) +- Remove `v` prefix from version ([#850](https://github.com/casey/just/pull/850) by [casey](https://github.com/casey)) +- Improve install script ([#847](https://github.com/casey/just/pull/847) by [casey](https://github.com/casey)) +- Move pages assets back to `docs` ([#846](https://github.com/casey/just/pull/846) by [casey](https://github.com/casey)) +- Move pages assets to `www` ([#845](https://github.com/casey/just/pull/845) by [casey](https://github.com/casey)) [0.9.4](https://github.com/casey/just/releases/tag/v0.9.4) - 2021-5-27 ---------------------------------------------------------------------- ### Misc -- Release `aarch64-unknown-linux-gnu` binaries ([#843](https://github.com/casey/just/pull/843)) -- Add `$` to non-default parameter grammar ([#839](https://github.com/casey/just/pull/839)) +- Release `aarch64-unknown-linux-gnu` binaries ([#843](https://github.com/casey/just/pull/843) by [casey](https://github.com/casey)) +- Add `$` to non-default parameter grammar ([#839](https://github.com/casey/just/pull/839) by [casey](https://github.com/casey)) - Add `$` to parameter grammar ([#838](https://github.com/casey/just/pull/838) by [NoahTheDuke](https://github.com/NoahTheDuke)) -- Fix readme links ([#836](https://github.com/casey/just/pull/836)) -- Add `vim-just` installation instructions to readme ([#835](https://github.com/casey/just/pull/835)) -- Refactor shebang handling ([#833](https://github.com/casey/just/pull/833)) +- Fix readme links ([#836](https://github.com/casey/just/pull/836) by [casey](https://github.com/casey)) +- Add `vim-just` installation instructions to readme ([#835](https://github.com/casey/just/pull/835) by [casey](https://github.com/casey)) +- Refactor shebang handling ([#833](https://github.com/casey/just/pull/833) by [casey](https://github.com/casey)) [0.9.3](https://github.com/casey/just/releases/tag/v0.9.3) - 2021-5-16 ---------------------------------------------------------------------- @@ -925,138 +925,138 @@ Changelog ### Added - Add shebang support for 'cmd.exe' ([#828](https://github.com/casey/just/pull/828) by [pansila](https://github.com/pansila)) - Add `.exe` to powershell scripts ([#826](https://github.com/casey/just/pull/826) by [sigoden](https://github.com/sigoden)) -- Add the `--command` subcommand ([#824](https://github.com/casey/just/pull/824)) +- Add the `--command` subcommand ([#824](https://github.com/casey/just/pull/824) by [casey](https://github.com/casey)) ### Fixed -- Fix bang lexing and placate clippy ([#821](https://github.com/casey/just/pull/821)) +- Fix bang lexing and placate clippy ([#821](https://github.com/casey/just/pull/821) by [casey](https://github.com/casey)) ### Misc - Fixed missing close apostrophe in GRAMMAR.md ([#830](https://github.com/casey/just/pull/830) by [SOF3](https://github.com/SOF3)) - Make 'else' keyword in grammar ([#829](https://github.com/casey/just/pull/829) by [SOF3](https://github.com/SOF3)) -- Add forbid script ([#827](https://github.com/casey/just/pull/827)) -- Remove `summary` feature ([#823](https://github.com/casey/just/pull/823)) +- Add forbid script ([#827](https://github.com/casey/just/pull/827) by [casey](https://github.com/casey)) +- Remove `summary` feature ([#823](https://github.com/casey/just/pull/823) by [casey](https://github.com/casey)) - Document that just is now in Arch official repo ([#814](https://github.com/casey/just/pull/814) by [svenstaro](https://github.com/svenstaro)) -- Fix changelog years ([#813](https://github.com/casey/just/pull/813)) +- Fix changelog years ([#813](https://github.com/casey/just/pull/813) by [casey](https://github.com/casey)) [0.9.2](https://github.com/casey/just/releases/tag/v0.9.2) - 2021-5-02 ---------------------------------------------------------------------- ### Fixed -- Pass evaluated arguments as positional arguments ([#810](https://github.com/casey/just/pull/810)) +- Pass evaluated arguments as positional arguments ([#810](https://github.com/casey/just/pull/810) by [casey](https://github.com/casey)) [0.9.1](https://github.com/casey/just/releases/tag/v0.9.1) - 2021-4-24 ---------------------------------------------------------------------- ### Added -- Change `--eval` to print variable value only ([#806](https://github.com/casey/just/pull/806)) -- Add `positional-arguments` setting ([#804](https://github.com/casey/just/pull/804)) -- Allow filtering variables to evaluate ([#795](https://github.com/casey/just/pull/795)) +- Change `--eval` to print variable value only ([#806](https://github.com/casey/just/pull/806) by [casey](https://github.com/casey)) +- Add `positional-arguments` setting ([#804](https://github.com/casey/just/pull/804) by [casey](https://github.com/casey)) +- Allow filtering variables to evaluate ([#795](https://github.com/casey/just/pull/795) by [casey](https://github.com/casey)) ### Changed -- Reform and improve string literals ([#793](https://github.com/casey/just/pull/793)) -- Allow evaluating justfiles with no recipes ([#794](https://github.com/casey/just/pull/794)) -- Unify string lexing ([#790](https://github.com/casey/just/pull/790)) +- Reform and improve string literals ([#793](https://github.com/casey/just/pull/793) by [casey](https://github.com/casey)) +- Allow evaluating justfiles with no recipes ([#794](https://github.com/casey/just/pull/794) by [casey](https://github.com/casey)) +- Unify string lexing ([#790](https://github.com/casey/just/pull/790) by [casey](https://github.com/casey)) ### Misc -- Test multi-line strings in interpolation ([#789](https://github.com/casey/just/pull/789)) -- Add shell setting examples to README ([#787](https://github.com/casey/just/pull/787)) +- Test multi-line strings in interpolation ([#789](https://github.com/casey/just/pull/789) by [casey](https://github.com/casey)) +- Add shell setting examples to README ([#787](https://github.com/casey/just/pull/787) by [casey](https://github.com/casey)) - Disable .env warning for now -- Warn if `.env` file loaded and `dotenv-load` unset ([#784](https://github.com/casey/just/pull/784)) +- Warn if `.env` file loaded and `dotenv-load` unset ([#784](https://github.com/casey/just/pull/784) by [casey](https://github.com/casey)) [0.9.0](https://github.com/casey/just/releases/tag/v0.9.0) - 2021-3-28 ---------------------------------------------------------------------- ### Changed -- Turn `=` deprecation warning into a hard error ([#780](https://github.com/casey/just/pull/780)) +- Turn `=` deprecation warning into a hard error ([#780](https://github.com/casey/just/pull/780) by [casey](https://github.com/casey)) [0.8.7](https://github.com/casey/just/releases/tag/v0.8.7) - 2021-3-28 ---------------------------------------------------------------------- ### Added -- Add `dotenv-load` setting ([#778](https://github.com/casey/just/pull/778)) +- Add `dotenv-load` setting ([#778](https://github.com/casey/just/pull/778) by [casey](https://github.com/casey)) ### Misc -- Change publish recipe to use stable rust ([#777](https://github.com/casey/just/pull/777)) +- Change publish recipe to use stable rust ([#777](https://github.com/casey/just/pull/777) by [casey](https://github.com/casey)) [0.8.6](https://github.com/casey/just/releases/tag/v0.8.6) - 2021-3-28 ---------------------------------------------------------------------- ### Added - Add just_executable() function ([#775](https://github.com/casey/just/pull/775) by [bew](https://github.com/bew)) -- Prefix parameters with `$` to export to environment ([#773](https://github.com/casey/just/pull/773)) -- Add `set export` to export all variables as environment variables ([#767](https://github.com/casey/just/pull/767)) +- Prefix parameters with `$` to export to environment ([#773](https://github.com/casey/just/pull/773) by [casey](https://github.com/casey)) +- Add `set export` to export all variables as environment variables ([#767](https://github.com/casey/just/pull/767) by [casey](https://github.com/casey)) ### Changed -- Suppress all output to stderr when `--quiet` ([#771](https://github.com/casey/just/pull/771)) +- Suppress all output to stderr when `--quiet` ([#771](https://github.com/casey/just/pull/771) by [casey](https://github.com/casey)) ### Misc -- Improve chooser invocation error message ([#772](https://github.com/casey/just/pull/772)) -- De-emphasize cmd.exe in readme ([#768](https://github.com/casey/just/pull/768)) -- Fix warnings ([#770](https://github.com/casey/just/pull/770)) +- Improve chooser invocation error message ([#772](https://github.com/casey/just/pull/772) by [casey](https://github.com/casey)) +- De-emphasize cmd.exe in readme ([#768](https://github.com/casey/just/pull/768) by [casey](https://github.com/casey)) +- Fix warnings ([#770](https://github.com/casey/just/pull/770) by [casey](https://github.com/casey)) [0.8.5](https://github.com/casey/just/releases/tag/v0.8.5) - 2021-3-24 ---------------------------------------------------------------------- ### Added -- Allow escaping double braces with `{{{{` ([#765](https://github.com/casey/just/pull/765)) +- Allow escaping double braces with `{{{{` ([#765](https://github.com/casey/just/pull/765) by [casey](https://github.com/casey)) ### Misc -- Reorganize readme to highlight editor support ([#764](https://github.com/casey/just/pull/764)) -- Add categories and keywords to Cargo manifest ([#763](https://github.com/casey/just/pull/763)) +- Reorganize readme to highlight editor support ([#764](https://github.com/casey/just/pull/764) by [casey](https://github.com/casey)) +- Add categories and keywords to Cargo manifest ([#763](https://github.com/casey/just/pull/763) by [casey](https://github.com/casey)) - Fix command output in readme ([#760](https://github.com/casey/just/pull/760) by [vvv](https://github.com/vvv)) - Note Emacs package `just-mode` in readme ([#759](https://github.com/casey/just/pull/759) by [leon-barrett](https://github.com/leon-barrett)) -- Note shebang line splitting inconsistency in readme ([#757](https://github.com/casey/just/pull/757)) +- Note shebang line splitting inconsistency in readme ([#757](https://github.com/casey/just/pull/757) by [casey](https://github.com/casey)) [0.8.4](https://github.com/casey/just/releases/tag/v0.8.4) - 2021-2-9 --------------------------------------------------------------------- ### Added -- Add options to control list formatting ([#753](https://github.com/casey/just/pull/753)) +- Add options to control list formatting ([#753](https://github.com/casey/just/pull/753) by [casey](https://github.com/casey)) ### Misc -- Document how to change the working directory in a recipe ([#752](https://github.com/casey/just/pull/752)) -- Implement `Default` for `Table` ([#748](https://github.com/casey/just/pull/748)) +- Document how to change the working directory in a recipe ([#752](https://github.com/casey/just/pull/752) by [casey](https://github.com/casey)) +- Implement `Default` for `Table` ([#748](https://github.com/casey/just/pull/748) by [casey](https://github.com/casey)) - Add Alpine Linux package to readme ([#736](https://github.com/casey/just/pull/736) by [jirutka](https://github.com/jirutka)) - Update to actions/cache@v2 ([#742](https://github.com/casey/just/pull/742) by [zyctree](https://github.com/zyctree)) - Add link in readme to GitHub Action ([#729](https://github.com/casey/just/pull/729) by [rossmacarthur](https://github.com/rossmacarthur)) - Add docs for justfile() and justfile_directory() ([#726](https://github.com/casey/just/pull/726) by [rminderhoud](https://github.com/rminderhoud)) -- Fix CI ([#727](https://github.com/casey/just/pull/727)) -- Improve readme ([#725](https://github.com/casey/just/pull/725)) -- Replace saythanks.io link with malto: link ([#723](https://github.com/casey/just/pull/723)) -- Update man page to v0.8.3 ([#720](https://github.com/casey/just/pull/720)) +- Fix CI ([#727](https://github.com/casey/just/pull/727) by [casey](https://github.com/casey)) +- Improve readme ([#725](https://github.com/casey/just/pull/725) by [casey](https://github.com/casey)) +- Replace saythanks.io link with malto: link ([#723](https://github.com/casey/just/pull/723) by [casey](https://github.com/casey)) +- Update man page to v0.8.3 ([#720](https://github.com/casey/just/pull/720) by [casey](https://github.com/casey)) [0.8.3](https://github.com/casey/just/releases/tag/v0.8.3) - 2020-10-27 ----------------------------------------------------------------------- ### Added -- Allow ignoring line endings inside delimiters ([#717](https://github.com/casey/just/pull/717)) +- Allow ignoring line endings inside delimiters ([#717](https://github.com/casey/just/pull/717) by [casey](https://github.com/casey)) [0.8.2](https://github.com/casey/just/releases/tag/v0.8.2) - 2020-10-26 ----------------------------------------------------------------------- ### Added -- Add conditional expressions ([#714](https://github.com/casey/just/pull/714)) +- Add conditional expressions ([#714](https://github.com/casey/just/pull/714) by [casey](https://github.com/casey)) ### Fixed - Allow completing variables and recipes after `--set` in zsh completion script ([#697](https://github.com/casey/just/pull/697) by [heyrict](https://github.com/heyrict)) ### Misc -- Add Parser::forbid ([#712](https://github.com/casey/just/pull/712)) -- Automatically track expected tokens while parsing ([#711](https://github.com/casey/just/pull/711)) -- Document feature flags in Cargo.toml ([#709](https://github.com/casey/just/pull/709)) +- Add Parser::forbid ([#712](https://github.com/casey/just/pull/712) by [casey](https://github.com/casey)) +- Automatically track expected tokens while parsing ([#711](https://github.com/casey/just/pull/711) by [casey](https://github.com/casey)) +- Document feature flags in Cargo.toml ([#709](https://github.com/casey/just/pull/709) by [casey](https://github.com/casey)) [0.8.1](https://github.com/casey/just/releases/tag/v0.8.1) - 2020-10-15 ----------------------------------------------------------------------- ### Changed -- Allow choosing multiple recipes to run ([#700](https://github.com/casey/just/pull/700)) +- Allow choosing multiple recipes to run ([#700](https://github.com/casey/just/pull/700) by [casey](https://github.com/casey)) - Complete recipes in bash completion script ([#685](https://github.com/casey/just/pull/685) by [vikesh-raj](https://github.com/vikesh-raj)) - Complete recipes names in PowerShell completion script ([#651](https://github.com/casey/just/pull/651) by [Insomniak47](https://github.com/Insomniak47)) ### Misc -- Add FreeBSD port to readme ([#705](https://github.com/casey/just/pull/705)) -- Placate clippy ([#698](https://github.com/casey/just/pull/698)) -- Fix build fix ([#693](https://github.com/casey/just/pull/693)) +- Add FreeBSD port to readme ([#705](https://github.com/casey/just/pull/705) by [casey](https://github.com/casey)) +- Placate clippy ([#698](https://github.com/casey/just/pull/698) by [casey](https://github.com/casey)) +- Fix build fix ([#693](https://github.com/casey/just/pull/693) by [casey](https://github.com/casey)) - Fix readme documentation for ignoring errors ([#692](https://github.com/casey/just/pull/692) by [kenden](https://github.com/kenden)) [0.8.0](https://github.com/casey/just/releases/tag/v0.8.0) - 2020-10-3 @@ -1066,60 +1066,60 @@ Changelog - Allow suppressing failures with `-` prefix ([#687](https://github.com/casey/just/pull/687) by [iwillspeak](https://github.com/iwillspeak)) ### Misc -- Document how to ignore errors with `-` in readme ([#690](https://github.com/casey/just/pull/690)) -- Install BSD Tar on GitHub Actions to fix CI errors ([#689](https://github.com/casey/just/pull/689)) +- Document how to ignore errors with `-` in readme ([#690](https://github.com/casey/just/pull/690) by [casey](https://github.com/casey)) +- Install BSD Tar on GitHub Actions to fix CI errors ([#689](https://github.com/casey/just/pull/689) by [casey](https://github.com/casey)) - Move separate quiet config value to verbosity ([#686](https://github.com/casey/just/pull/686) by [Celeo](https://github.com/Celeo)) [0.7.3](https://github.com/casey/just/releases/tag/v0.7.3) - 2020-9-17 ---------------------------------------------------------------------- ### Added -- Add the `--choose` subcommand ([#680](https://github.com/casey/just/pull/680)) +- Add the `--choose` subcommand ([#680](https://github.com/casey/just/pull/680) by [casey](https://github.com/casey)) ### Misc -- Combine integration tests into single binary ([#679](https://github.com/casey/just/pull/679)) -- Document `--unsorted` flag in readme ([#672](https://github.com/casey/just/pull/672)) +- Combine integration tests into single binary ([#679](https://github.com/casey/just/pull/679) by [casey](https://github.com/casey)) +- Document `--unsorted` flag in readme ([#672](https://github.com/casey/just/pull/672) by [casey](https://github.com/casey)) [0.7.2](https://github.com/casey/just/releases/tag/v0.7.2) - 2020-8-23 ---------------------------------------------------------------------- ### Added -- Add option to print recipes in source order ([#669](https://github.com/casey/just/pull/669)) +- Add option to print recipes in source order ([#669](https://github.com/casey/just/pull/669) by [casey](https://github.com/casey)) ### Misc -- Mention Linux, MacOS and Windows support in readme ([#666](https://github.com/casey/just/pull/666)) -- Add list highlighting nice features to readme ([#664](https://github.com/casey/just/pull/664)) +- Mention Linux, MacOS and Windows support in readme ([#666](https://github.com/casey/just/pull/666) by [casey](https://github.com/casey)) +- Add list highlighting nice features to readme ([#664](https://github.com/casey/just/pull/664) by [casey](https://github.com/casey)) [0.7.1](https://github.com/casey/just/releases/tag/v0.7.1) - 2020-7-19 ---------------------------------------------------------------------- ### Fixed -- Search for `.env` file from working directory ([#661](https://github.com/casey/just/pull/661)) +- Search for `.env` file from working directory ([#661](https://github.com/casey/just/pull/661) by [casey](https://github.com/casey)) ### Misc -- Move link-time optimization config into `Cargo.toml` ([#658](https://github.com/casey/just/pull/658)) +- Move link-time optimization config into `Cargo.toml` ([#658](https://github.com/casey/just/pull/658) by [casey](https://github.com/casey)) [0.7.0](https://github.com/casey/just/releases/tag/v0.7.0) - 2020-7-16 ---------------------------------------------------------------------- ### Breaking -- Skip `.env` items which are set in environment ([#656](https://github.com/casey/just/pull/656)) +- Skip `.env` items which are set in environment ([#656](https://github.com/casey/just/pull/656) by [casey](https://github.com/casey)) ### Misc -- Mark tags that start with `v` as releases ([#654](https://github.com/casey/just/pull/654)) +- Mark tags that start with `v` as releases ([#654](https://github.com/casey/just/pull/654) by [casey](https://github.com/casey)) [0.6.1](https://github.com/casey/just/releases/tag/v0.6.1) - 2020-6-28 ---------------------------------------------------------------------- ### Changed -- Only use `cygpath` on shebang if it contains `/` ([#652](https://github.com/casey/just/pull/652)) +- Only use `cygpath` on shebang if it contains `/` ([#652](https://github.com/casey/just/pull/652) by [casey](https://github.com/casey)) [0.6.0](https://github.com/casey/just/releases/tag/v0.6.0) - 2020-6-18 ---------------------------------------------------------------------- ### Changed - Ignore '@' returned from interpolation evaluation ([#636](https://github.com/casey/just/pull/636) by [rjsberry](https://github.com/rjsberry)) -- Strip leading spaces after line continuation ([#635](https://github.com/casey/just/pull/635)) +- Strip leading spaces after line continuation ([#635](https://github.com/casey/just/pull/635) by [casey](https://github.com/casey)) ### Added - Add variadic parameters that accept zero or more arguments ([#645](https://github.com/casey/just/pull/645) by [rjsberry](https://github.com/rjsberry)) @@ -1127,17 +1127,17 @@ Changelog ### Misc - Clarify variadic parameter default values ([#646](https://github.com/casey/just/pull/646) by [rjsberry](https://github.com/rjsberry)) - Add keybase example justfile ([#640](https://github.com/casey/just/pull/640) by [blaggacao](https://github.com/blaggacao)) -- Strip trailing whitespace in `examples/pre-commit.just` ([#644](https://github.com/casey/just/pull/644)) -- Test that example justfiles successfully parse ([#643](https://github.com/casey/just/pull/643)) -- Link example justfiles in readme ([#641](https://github.com/casey/just/pull/641)) +- Strip trailing whitespace in `examples/pre-commit.just` ([#644](https://github.com/casey/just/pull/644) by [casey](https://github.com/casey)) +- Test that example justfiles successfully parse ([#643](https://github.com/casey/just/pull/643) by [casey](https://github.com/casey)) +- Link example justfiles in readme ([#641](https://github.com/casey/just/pull/641) by [casey](https://github.com/casey)) - Add example justfile ([#639](https://github.com/casey/just/pull/639) by [blaggacao](https://github.com/blaggacao)) -- Document how to run recipes after another recipe ([#630](https://github.com/casey/just/pull/630)) +- Document how to run recipes after another recipe ([#630](https://github.com/casey/just/pull/630) by [casey](https://github.com/casey)) [0.5.11](https://github.com/casey/just/releases/tag/v0.5.11) - 2020-5-23 ------------------------------------------------------------------------ ### Added -- Don't load `.env` file when `--no-dotenv` is passed ([#627](https://github.com/casey/just/pull/627)) +- Don't load `.env` file when `--no-dotenv` is passed ([#627](https://github.com/casey/just/pull/627) by [casey](https://github.com/casey)) ### Changed - Complete recipe names in fish completion script ([#625](https://github.com/casey/just/pull/625) by [tyehle](https://github.com/tyehle)) @@ -1151,131 +1151,131 @@ Changelog ### Added - Update zsh completion file ([#606](https://github.com/casey/just/pull/606) by [heyrict](https://github.com/heyrict)) -- Add `--variables` subcommand that prints variable names ([#608](https://github.com/casey/just/pull/608)) -- Add github pages site with improved install script ([#597](https://github.com/casey/just/pull/597)) +- Add `--variables` subcommand that prints variable names ([#608](https://github.com/casey/just/pull/608) by [casey](https://github.com/casey)) +- Add github pages site with improved install script ([#597](https://github.com/casey/just/pull/597) by [casey](https://github.com/casey)) ### Fixed -- Don't require justfile to print completions ([#596](https://github.com/casey/just/pull/596)) +- Don't require justfile to print completions ([#596](https://github.com/casey/just/pull/596) by [casey](https://github.com/casey)) ### Misc -- Only build for linux on docs.rs ([#611](https://github.com/casey/just/pull/611)) -- Trim completions and ensure final newline ([#609](https://github.com/casey/just/pull/609)) -- Trigger build on pushes and pull requests ([#607](https://github.com/casey/just/pull/607)) -- Document behavior of `@` on shebang recipes ([#602](https://github.com/casey/just/pull/602)) -- Add `.nojekyll` file to github pages site ([#599](https://github.com/casey/just/pull/599)) -- Add `:` favicon ([#598](https://github.com/casey/just/pull/598)) -- Delete old CI configuration and update build badge ([#595](https://github.com/casey/just/pull/595)) -- Add download count badge to readme ([#594](https://github.com/casey/just/pull/594)) -- Wrap comments at 80 characters ([#593](https://github.com/casey/just/pull/593)) -- Use unstable rustfmt configuration options ([#592](https://github.com/casey/just/pull/592)) +- Only build for linux on docs.rs ([#611](https://github.com/casey/just/pull/611) by [casey](https://github.com/casey)) +- Trim completions and ensure final newline ([#609](https://github.com/casey/just/pull/609) by [casey](https://github.com/casey)) +- Trigger build on pushes and pull requests ([#607](https://github.com/casey/just/pull/607) by [casey](https://github.com/casey)) +- Document behavior of `@` on shebang recipes ([#602](https://github.com/casey/just/pull/602) by [casey](https://github.com/casey)) +- Add `.nojekyll` file to github pages site ([#599](https://github.com/casey/just/pull/599) by [casey](https://github.com/casey)) +- Add `:` favicon ([#598](https://github.com/casey/just/pull/598) by [casey](https://github.com/casey)) +- Delete old CI configuration and update build badge ([#595](https://github.com/casey/just/pull/595) by [casey](https://github.com/casey)) +- Add download count badge to readme ([#594](https://github.com/casey/just/pull/594) by [casey](https://github.com/casey)) +- Wrap comments at 80 characters ([#593](https://github.com/casey/just/pull/593) by [casey](https://github.com/casey)) +- Use unstable rustfmt configuration options ([#592](https://github.com/casey/just/pull/592) by [casey](https://github.com/casey)) [0.5.8](https://github.com/casey/just/releases/tag/v0.5.8) - 2020-1-28 ---------------------------------------------------------------------- ### Changed -- Only use `cygpath` on windows if present ([#586](https://github.com/casey/just/pull/586)) +- Only use `cygpath` on windows if present ([#586](https://github.com/casey/just/pull/586) by [casey](https://github.com/casey)) ### Misc -- Improve comments in justfile ([#588](https://github.com/casey/just/pull/588)) -- Remove unused dependencies ([#587](https://github.com/casey/just/pull/587)) +- Improve comments in justfile ([#588](https://github.com/casey/just/pull/588) by [casey](https://github.com/casey)) +- Remove unused dependencies ([#587](https://github.com/casey/just/pull/587) by [casey](https://github.com/casey)) [0.5.7](https://github.com/casey/just/releases/tag/v0.5.7) - 2020-1-28 ---------------------------------------------------------------------- ### Misc -- Don't include directories in release archive ([#583](https://github.com/casey/just/pull/583)) +- Don't include directories in release archive ([#583](https://github.com/casey/just/pull/583) by [casey](https://github.com/casey)) [0.5.6](https://github.com/casey/just/releases/tag/v0.5.6) - 2020-1-28 ---------------------------------------------------------------------- ### Misc -- Build and upload release artifacts from GitHub Actions ([#581](https://github.com/casey/just/pull/581)) -- List solus package in readme ([#579](https://github.com/casey/just/pull/579)) -- Expand use of GitHub Actions ([#580](https://github.com/casey/just/pull/580)) +- Build and upload release artifacts from GitHub Actions ([#581](https://github.com/casey/just/pull/581) by [casey](https://github.com/casey)) +- List solus package in readme ([#579](https://github.com/casey/just/pull/579) by [casey](https://github.com/casey)) +- Expand use of GitHub Actions ([#580](https://github.com/casey/just/pull/580) by [casey](https://github.com/casey)) - Fix readme typo: interpetation -> interpretation ([#578](https://github.com/casey/just/pull/578) by [Plommonsorbet](https://github.com/Plommonsorbet)) [0.5.5](https://github.com/casey/just/releases/tag/v0.5.5) - 2020-1-15 ---------------------------------------------------------------------- ### Added -- Generate shell completion scripts with `--completions` ([#572](https://github.com/casey/just/pull/572)) +- Generate shell completion scripts with `--completions` ([#572](https://github.com/casey/just/pull/572) by [casey](https://github.com/casey)) ### Misc -- Check long lines and FIXME/TODO on CI ([#575](https://github.com/casey/just/pull/575)) -- Add additional continuous integration checks ([#574](https://github.com/casey/just/pull/574)) +- Check long lines and FIXME/TODO on CI ([#575](https://github.com/casey/just/pull/575) by [casey](https://github.com/casey)) +- Add additional continuous integration checks ([#574](https://github.com/casey/just/pull/574) by [casey](https://github.com/casey)) [0.5.4](https://github.com/casey/just/releases/tag/v0.5.4) - 2019-12-25 ----------------------------------------------------------------------- ### Added -- Add `justfile_directory()` and `justfile()` ([#569](https://github.com/casey/just/pull/569)) +- Add `justfile_directory()` and `justfile()` ([#569](https://github.com/casey/just/pull/569) by [casey](https://github.com/casey)) ### Misc -- Add table of package managers that include just to readme ([#568](https://github.com/casey/just/pull/568)) +- Add table of package managers that include just to readme ([#568](https://github.com/casey/just/pull/568) by [casey](https://github.com/casey)) - Remove yaourt AUR helper from readme ([#567](https://github.com/casey/just/pull/567) by [ky0n](https://github.com/ky0n)) -- Fix regression in error message color printing ([#566](https://github.com/casey/just/pull/566)) -- Reform indentation handling ([#565](https://github.com/casey/just/pull/565)) -- Update Cargo.lock with new version ([#564](https://github.com/casey/just/pull/564)) +- Fix regression in error message color printing ([#566](https://github.com/casey/just/pull/566) by [casey](https://github.com/casey)) +- Reform indentation handling ([#565](https://github.com/casey/just/pull/565) by [casey](https://github.com/casey)) +- Update Cargo.lock with new version ([#564](https://github.com/casey/just/pull/564) by [casey](https://github.com/casey)) [0.5.3](https://github.com/casey/just/releases/tag/v0.5.3) - 2019-12-11 ----------------------------------------------------------------------- ### Misc -- Assert that lexer advances over entire input ([#560](https://github.com/casey/just/pull/560)) -- Fix typo: `chracter` -> `character` ([#561](https://github.com/casey/just/pull/561)) -- Improve pre-publish check ([#562](https://github.com/casey/just/pull/562)) +- Assert that lexer advances over entire input ([#560](https://github.com/casey/just/pull/560) by [casey](https://github.com/casey)) +- Fix typo: `chracter` -> `character` ([#561](https://github.com/casey/just/pull/561) by [casey](https://github.com/casey)) +- Improve pre-publish check ([#562](https://github.com/casey/just/pull/562) by [casey](https://github.com/casey)) [0.5.2](https://github.com/casey/just/releases/tag/v0.5.2) - 2019-12-7 ---------------------------------------------------------------------- ### Added -- Add flags to set and clear shell arguments ([#551](https://github.com/casey/just/pull/551)) -- Allow passing arguments to dependencies ([#555](https://github.com/casey/just/pull/555)) +- Add flags to set and clear shell arguments ([#551](https://github.com/casey/just/pull/551) by [casey](https://github.com/casey)) +- Allow passing arguments to dependencies ([#555](https://github.com/casey/just/pull/555) by [casey](https://github.com/casey)) ### Misc -- Un-implement Deref for Table ([#546](https://github.com/casey/just/pull/546)) -- Resolve recipe dependencies ([#547](https://github.com/casey/just/pull/547)) -- Resolve alias targets ([#548](https://github.com/casey/just/pull/548)) -- Remove unnecessary type argument to Alias ([#549](https://github.com/casey/just/pull/549)) -- Resolve functions ([#550](https://github.com/casey/just/pull/550)) -- Reform scope and binding ([#556](https://github.com/casey/just/pull/556)) +- Un-implement Deref for Table ([#546](https://github.com/casey/just/pull/546) by [casey](https://github.com/casey)) +- Resolve recipe dependencies ([#547](https://github.com/casey/just/pull/547) by [casey](https://github.com/casey)) +- Resolve alias targets ([#548](https://github.com/casey/just/pull/548) by [casey](https://github.com/casey)) +- Remove unnecessary type argument to Alias ([#549](https://github.com/casey/just/pull/549) by [casey](https://github.com/casey)) +- Resolve functions ([#550](https://github.com/casey/just/pull/550) by [casey](https://github.com/casey)) +- Reform scope and binding ([#556](https://github.com/casey/just/pull/556) by [casey](https://github.com/casey)) [0.5.1](https://github.com/casey/just/releases/tag/v0.5.1) - 2019-11-20 ----------------------------------------------------------------------- ### Added -- Add `--init` subcommand ([#541](https://github.com/casey/just/pull/541)) +- Add `--init` subcommand ([#541](https://github.com/casey/just/pull/541) by [casey](https://github.com/casey)) ### Changed -- Avoid fs::canonicalize ([#539](https://github.com/casey/just/pull/539)) +- Avoid fs::canonicalize ([#539](https://github.com/casey/just/pull/539) by [casey](https://github.com/casey)) ### Misc -- Mention `set shell` as alternative to installing `sh` ([#533](https://github.com/casey/just/pull/533)) -- Refactor Compilation error to contain a Token ([#535](https://github.com/casey/just/pull/535)) -- Move lexer comment ([#536](https://github.com/casey/just/pull/536)) -- Add missing `--init` test ([#543](https://github.com/casey/just/pull/543)) +- Mention `set shell` as alternative to installing `sh` ([#533](https://github.com/casey/just/pull/533) by [casey](https://github.com/casey)) +- Refactor Compilation error to contain a Token ([#535](https://github.com/casey/just/pull/535) by [casey](https://github.com/casey)) +- Move lexer comment ([#536](https://github.com/casey/just/pull/536) by [casey](https://github.com/casey)) +- Add missing `--init` test ([#543](https://github.com/casey/just/pull/543) by [casey](https://github.com/casey)) [0.5.0](https://github.com/casey/just/releases/tag/v0.5.0) - 2019-11-12 ----------------------------------------------------------------------- ### Added -- Add `set shell := [...]` to grammar ([#526](https://github.com/casey/just/pull/526)) -- Add `shell` setting ([#525](https://github.com/casey/just/pull/525)) -- Document settings in readme ([#527](https://github.com/casey/just/pull/527)) +- Add `set shell := [...]` to grammar ([#526](https://github.com/casey/just/pull/526) by [casey](https://github.com/casey)) +- Add `shell` setting ([#525](https://github.com/casey/just/pull/525) by [casey](https://github.com/casey)) +- Document settings in readme ([#527](https://github.com/casey/just/pull/527) by [casey](https://github.com/casey)) ### Changed -- Reform positional argument parsing ([#523](https://github.com/casey/just/pull/523)) -- Highlight echoed recipe lines in bold by default ([#512](https://github.com/casey/just/pull/512)) +- Reform positional argument parsing ([#523](https://github.com/casey/just/pull/523) by [casey](https://github.com/casey)) +- Highlight echoed recipe lines in bold by default ([#512](https://github.com/casey/just/pull/512) by [casey](https://github.com/casey)) ### Misc -- Gargantuan refactor ([#522](https://github.com/casey/just/pull/522)) -- Move subcommand execution into Subcommand ([#514](https://github.com/casey/just/pull/514)) -- Move `cd` out of Config::from_matches ([#513](https://github.com/casey/just/pull/513)) -- Remove now-unnecessary borrow checker appeasement ([#511](https://github.com/casey/just/pull/511)) -- Reform Parser ([#509](https://github.com/casey/just/pull/509)) -- Note need to publish with nightly cargo ([#506](https://github.com/casey/just/pull/506)) +- Gargantuan refactor ([#522](https://github.com/casey/just/pull/522) by [casey](https://github.com/casey)) +- Move subcommand execution into Subcommand ([#514](https://github.com/casey/just/pull/514) by [casey](https://github.com/casey)) +- Move `cd` out of Config::from_matches ([#513](https://github.com/casey/just/pull/513) by [casey](https://github.com/casey)) +- Remove now-unnecessary borrow checker appeasement ([#511](https://github.com/casey/just/pull/511) by [casey](https://github.com/casey)) +- Reform Parser ([#509](https://github.com/casey/just/pull/509) by [casey](https://github.com/casey)) +- Note need to publish with nightly cargo ([#506](https://github.com/casey/just/pull/506) by [casey](https://github.com/casey)) [0.4.5](https://github.com/casey/just/releases/tag/v0.4.5) - 2019-10-31 ----------------------------------------------------------------------- @@ -1286,46 +1286,46 @@ Changelog - Display alias with `--show NAME` if one exists ### Documented -- Document multi-line constructs (for/if/while) ([#453](https://github.com/casey/just/pull/453)) -- Generate man page with help2man ([#463](https://github.com/casey/just/pull/463)) -- Add context to deprecation warnings ([#473](https://github.com/casey/just/pull/473)) -- Improve messages for alias error messages ([#500](https://github.com/casey/just/pull/500)) +- Document multi-line constructs (for/if/while) ([#453](https://github.com/casey/just/pull/453) by [casey](https://github.com/casey)) +- Generate man page with help2man ([#463](https://github.com/casey/just/pull/463) by [casey](https://github.com/casey)) +- Add context to deprecation warnings ([#473](https://github.com/casey/just/pull/473) by [casey](https://github.com/casey)) +- Improve messages for alias error messages ([#500](https://github.com/casey/just/pull/500) by [casey](https://github.com/casey)) ### Misc ### Cleanup - Update deprecated rust range patterns and clippy config ([#450](https://github.com/casey/just/pull/450) by [light4](https://github.com/light4)) -- Make comments in common.rs lowercase ([#470](https://github.com/casey/just/pull/470)) -- Use `pub(crate)` instead of `pub` ([#471](https://github.com/casey/just/pull/471)) -- Hide summary functionality behind feature flag ([#472](https://github.com/casey/just/pull/472)) -- Fix `summary` feature conditional compilation ([#475](https://github.com/casey/just/pull/475)) -- Allow integration test cases to omit common values ([#480](https://github.com/casey/just/pull/480)) -- Add `unindent()` for nicer integration test strings ([#481](https://github.com/casey/just/pull/481)) -- Start pulling argument parsing out of run::run() ([#483](https://github.com/casey/just/pull/483)) -- Add explicit `Subcommand` enum ([#484](https://github.com/casey/just/pull/484)) -- Avoid using error code `1` in integration tests ([#486](https://github.com/casey/just/pull/486)) -- Use more indented strings in integration tests ([#489](https://github.com/casey/just/pull/489)) -- Refactor `run::run` and Config ([#490](https://github.com/casey/just/pull/490)) -- Remove `misc.rs` ([#491](https://github.com/casey/just/pull/491)) -- Remove unused `use` statements ([#497](https://github.com/casey/just/pull/497)) -- Refactor lexer tests ([#498](https://github.com/casey/just/pull/498)) -- Use constants instead of literals in arg parser ([#504](https://github.com/casey/just/pull/504)) +- Make comments in common.rs lowercase ([#470](https://github.com/casey/just/pull/470) by [casey](https://github.com/casey)) +- Use `pub(crate)` instead of `pub` ([#471](https://github.com/casey/just/pull/471) by [casey](https://github.com/casey)) +- Hide summary functionality behind feature flag ([#472](https://github.com/casey/just/pull/472) by [casey](https://github.com/casey)) +- Fix `summary` feature conditional compilation ([#475](https://github.com/casey/just/pull/475) by [casey](https://github.com/casey)) +- Allow integration test cases to omit common values ([#480](https://github.com/casey/just/pull/480) by [casey](https://github.com/casey)) +- Add `unindent()` for nicer integration test strings ([#481](https://github.com/casey/just/pull/481) by [casey](https://github.com/casey)) +- Start pulling argument parsing out of run::run() ([#483](https://github.com/casey/just/pull/483) by [casey](https://github.com/casey)) +- Add explicit `Subcommand` enum ([#484](https://github.com/casey/just/pull/484) by [casey](https://github.com/casey)) +- Avoid using error code `1` in integration tests ([#486](https://github.com/casey/just/pull/486) by [casey](https://github.com/casey)) +- Use more indented strings in integration tests ([#489](https://github.com/casey/just/pull/489) by [casey](https://github.com/casey)) +- Refactor `run::run` and Config ([#490](https://github.com/casey/just/pull/490) by [casey](https://github.com/casey)) +- Remove `misc.rs` ([#491](https://github.com/casey/just/pull/491) by [casey](https://github.com/casey)) +- Remove unused `use` statements ([#497](https://github.com/casey/just/pull/497) by [casey](https://github.com/casey)) +- Refactor lexer tests ([#498](https://github.com/casey/just/pull/498) by [casey](https://github.com/casey)) +- Use constants instead of literals in arg parser ([#504](https://github.com/casey/just/pull/504) by [casey](https://github.com/casey)) ### Infrastructure - Add repository attribute to Cargo.toml ([#493](https://github.com/casey/just/pull/493) by [SOF3](https://github.com/SOF3)) -- Check minimal version compatibility before publishing ([#487](https://github.com/casey/just/pull/487)) +- Check minimal version compatibility before publishing ([#487](https://github.com/casey/just/pull/487) by [casey](https://github.com/casey)) ### Continuous Integration -- Disable FreeBSD builds ([#474](https://github.com/casey/just/pull/474)) -- Use `bash` as shell for all integration tests ([#479](https://github.com/casey/just/pull/479)) -- Don't install `dash` on Travis ([#482](https://github.com/casey/just/pull/482)) +- Disable FreeBSD builds ([#474](https://github.com/casey/just/pull/474) by [casey](https://github.com/casey)) +- Use `bash` as shell for all integration tests ([#479](https://github.com/casey/just/pull/479) by [casey](https://github.com/casey)) +- Don't install `dash` on Travis ([#482](https://github.com/casey/just/pull/482) by [casey](https://github.com/casey)) ### Dependencies - Use `tempfile` crate instead of `tempdir` ([#455](https://github.com/casey/just/pull/455) by [NickeZ](https://github.com/NickeZ)) - Bump clap dependency to 2.33.0 ([#458](https://github.com/casey/just/pull/458) by [NickeZ](https://github.com/NickeZ)) -- Minimize dependency version requirements ([#461](https://github.com/casey/just/pull/461)) -- Remove dependency on brev ([#462](https://github.com/casey/just/pull/462)) -- Update dependencies ([#501](https://github.com/casey/just/pull/501)) +- Minimize dependency version requirements ([#461](https://github.com/casey/just/pull/461) by [casey](https://github.com/casey)) +- Remove dependency on brev ([#462](https://github.com/casey/just/pull/462) by [casey](https://github.com/casey)) +- Update dependencies ([#501](https://github.com/casey/just/pull/501) by [casey](https://github.com/casey)) [0.4.4](https://github.com/casey/just/releases/tag/v0.4.4) - 2019-06-02 ----------------------------------------------------------------------- @@ -1334,69 +1334,69 @@ Changelog - Ignore file name case while searching for justfile ([#436](https://github.com/casey/just/pull/436) by [shevtsiv](https://github.com/shevtsiv)) ### Added -- Display alias target with `--show` ([#443](https://github.com/casey/just/pull/443)) +- Display alias target with `--show` ([#443](https://github.com/casey/just/pull/443) by [casey](https://github.com/casey)) [0.4.3](https://github.com/casey/just/releases/tag/v0.4.3) - 2019-05-07 ----------------------------------------------------------------------- ### Changed -- Deprecate `=` in assignments, aliases, and exports in favor of `:=` ([#413](https://github.com/casey/just/pull/413)) +- Deprecate `=` in assignments, aliases, and exports in favor of `:=` ([#413](https://github.com/casey/just/pull/413) by [casey](https://github.com/casey)) ### Added -- Pass stdin handle to backtick process ([#409](https://github.com/casey/just/pull/409)) +- Pass stdin handle to backtick process ([#409](https://github.com/casey/just/pull/409) by [casey](https://github.com/casey)) ### Documented -- Fix readme command line ([#411](https://github.com/casey/just/pull/411)) -- Typo: "command equivelant" -> "command equivalent" ([#418](https://github.com/casey/just/pull/418)) +- Fix readme command line ([#411](https://github.com/casey/just/pull/411) by [casey](https://github.com/casey)) +- Typo: "command equivelant" -> "command equivalent" ([#418](https://github.com/casey/just/pull/418) by [casey](https://github.com/casey)) - Mention Make’s “phony target” workaround in the comparison ([#421](https://github.com/casey/just/pull/421) by [roryokane](https://github.com/roryokane)) -- Add Void Linux install instructions to readme ([#423](https://github.com/casey/just/pull/423)) +- Add Void Linux install instructions to readme ([#423](https://github.com/casey/just/pull/423) by [casey](https://github.com/casey)) ### Cleaned up or Refactored -- Remove stray source files ([#408](https://github.com/casey/just/pull/408)) -- Replace some calls to brev crate ([#410](https://github.com/casey/just/pull/410)) -- Lexer code deduplication and refactoring ([#414](https://github.com/casey/just/pull/414)) -- Refactor and rename test macros ([#415](https://github.com/casey/just/pull/415)) -- Move CompilationErrorKind into separate module ([#416](https://github.com/casey/just/pull/416)) -- Remove `write_token_error_context` ([#417](https://github.com/casey/just/pull/417)) +- Remove stray source files ([#408](https://github.com/casey/just/pull/408) by [casey](https://github.com/casey)) +- Replace some calls to brev crate ([#410](https://github.com/casey/just/pull/410) by [casey](https://github.com/casey)) +- Lexer code deduplication and refactoring ([#414](https://github.com/casey/just/pull/414) by [casey](https://github.com/casey)) +- Refactor and rename test macros ([#415](https://github.com/casey/just/pull/415) by [casey](https://github.com/casey)) +- Move CompilationErrorKind into separate module ([#416](https://github.com/casey/just/pull/416) by [casey](https://github.com/casey)) +- Remove `write_token_error_context` ([#417](https://github.com/casey/just/pull/417) by [casey](https://github.com/casey)) [0.4.2](https://github.com/casey/just/releases/tag/v0.4.2) - 2019-04-12 ----------------------------------------------------------------------- ### Changed -- Regex-based lexer replaced with much nicer character-at-a-time lexer ([#406](https://github.com/casey/just/pull/406)) +- Regex-based lexer replaced with much nicer character-at-a-time lexer ([#406](https://github.com/casey/just/pull/406) by [casey](https://github.com/casey)) [0.4.1](https://github.com/casey/just/releases/tag/v0.4.1) - 2019-04-12 ----------------------------------------------------------------------- ### Changed -- Make summary function non-generic ([#404](https://github.com/casey/just/pull/404)) +- Make summary function non-generic ([#404](https://github.com/casey/just/pull/404) by [casey](https://github.com/casey)) [0.4.0](https://github.com/casey/just/releases/tag/v0.4.0) - 2019-04-12 ----------------------------------------------------------------------- ### Added - Add recipe aliases ([#390](https://github.com/casey/just/pull/390) by [ryloric](https://github.com/ryloric)) -- Allow arbitrary expressions as default arguments ([#400](https://github.com/casey/just/pull/400)) -- Add justfile summaries ([#399](https://github.com/casey/just/pull/399)) -- Allow outer shebang lines so justfiles can be used as scripts ([#393](https://github.com/casey/just/pull/393)) +- Allow arbitrary expressions as default arguments ([#400](https://github.com/casey/just/pull/400) by [casey](https://github.com/casey)) +- Add justfile summaries ([#399](https://github.com/casey/just/pull/399) by [casey](https://github.com/casey)) +- Allow outer shebang lines so justfiles can be used as scripts ([#393](https://github.com/casey/just/pull/393) by [casey](https://github.com/casey)) - Allow `--justfile` without `--working-directory` ([#392](https://github.com/casey/just/pull/392) by [smonami](https://github.com/smonami)) -- Add link to Chinese translation of readme by chinanf-boy ([#377](https://github.com/casey/just/pull/377)) +- Add link to Chinese translation of readme by chinanf-boy ([#377](https://github.com/casey/just/pull/377) by [casey](https://github.com/casey)) ### Changed -- Upgrade to Rust 2018 ([#394](https://github.com/casey/just/pull/394)) -- Format the codebase with rustfmt ([#346](https://github.com/casey/just/pull/346)) +- Upgrade to Rust 2018 ([#394](https://github.com/casey/just/pull/394) by [casey](https://github.com/casey)) +- Format the codebase with rustfmt ([#346](https://github.com/casey/just/pull/346) by [casey](https://github.com/casey)) [0.3.13](https://github.com/casey/just/releases/tag/v0.3.13) - 2018-11-06 ------------------------------------------------------------------------- ### Added - Print recipe signature if missing arguments ([#369](https://github.com/casey/just/pull/369) by [ladysamantha](https://github.com/ladysamantha)) -- Add grandiloquent verbosity level that echos shebang recipes ([#348](https://github.com/casey/just/pull/348)) -- Wait for child processes to finish ([#345](https://github.com/casey/just/pull/345)) -- Improve invalid escape sequence error messages ([#328](https://github.com/casey/just/pull/328)) +- Add grandiloquent verbosity level that echos shebang recipes ([#348](https://github.com/casey/just/pull/348) by [casey](https://github.com/casey)) +- Wait for child processes to finish ([#345](https://github.com/casey/just/pull/345) by [casey](https://github.com/casey)) +- Improve invalid escape sequence error messages ([#328](https://github.com/casey/just/pull/328) by [casey](https://github.com/casey)) ### Fixed -- Use PutBackN instead of PutBack in parser ([#364](https://github.com/casey/just/pull/364)) +- Use PutBackN instead of PutBack in parser ([#364](https://github.com/casey/just/pull/364) by [casey](https://github.com/casey)) [0.3.12](https://github.com/casey/just/releases/tag/v0.3.12) - 2018-06-19 ------------------------------------------------------------------------- @@ -1408,39 +1408,39 @@ Changelog ------------------------------------------------------------------------ ### Fixed -- Fixed colors on windows ([#317](https://github.com/casey/just/pull/317)) +- Fixed colors on windows ([#317](https://github.com/casey/just/pull/317) by [casey](https://github.com/casey)) [0.3.10](https://github.com/casey/just/releases/tag/v0.3.10) - 2018-3-19 ------------------------------------------------------------------------ ### Added -- Make .env vars available in env_var functions ([#310](https://github.com/casey/just/pull/310)) +- Make .env vars available in env_var functions ([#310](https://github.com/casey/just/pull/310) by [casey](https://github.com/casey)) [0.3.8](https://github.com/casey/just/releases/tag/v0.3.8) - 2018-3-5 --------------------------------------------------------------------- ### Added -- Add dotenv integration ([#306](https://github.com/casey/just/pull/306)) +- Add dotenv integration ([#306](https://github.com/casey/just/pull/306) by [casey](https://github.com/casey)) [0.3.7](https://github.com/casey/just/releases/tag/v0.3.7) - 2017-12-11 ----------------------------------------------------------------------- ### Fixed -- Fix error if ! appears in comment ([#296](https://github.com/casey/just/pull/296)) +- Fix error if ! appears in comment ([#296](https://github.com/casey/just/pull/296) by [casey](https://github.com/casey)) [0.3.6](https://github.com/casey/just/releases/tag/v0.3.6) - 2017-12-11 ----------------------------------------------------------------------- ### Fixed -- Lex CRLF line endings properly ([#292](https://github.com/casey/just/pull/292)) +- Lex CRLF line endings properly ([#292](https://github.com/casey/just/pull/292) by [casey](https://github.com/casey)) [0.3.5](https://github.com/casey/just/releases/tag/v0.3.5) - 2017-12-11 ----------------------------------------------------------------------- ### Added -- Align doc-comments in `--list` output ([#273](https://github.com/casey/just/pull/273)) -- Add `arch()`, `os()`, and `os_family()` functions ([#277](https://github.com/casey/just/pull/277)) -- Add `env_var(key)` and `env_var_or_default(key, default)` functions ([#280](https://github.com/casey/just/pull/280)) +- Align doc-comments in `--list` output ([#273](https://github.com/casey/just/pull/273) by [casey](https://github.com/casey)) +- Add `arch()`, `os()`, and `os_family()` functions ([#277](https://github.com/casey/just/pull/277) by [casey](https://github.com/casey)) +- Add `env_var(key)` and `env_var_or_default(key, default)` functions ([#280](https://github.com/casey/just/pull/280) by [casey](https://github.com/casey)) [0.3.4](https://github.com/casey/just/releases/tag/v0.3.4) - 2017-10-06 ----------------------------------------------------------------------- @@ -1449,11 +1449,11 @@ Changelog - Do not evaluate backticks in assignments during dry runs ([#253](https://github.com/casey/just/pull/253) by [aoeu](https://github.com/aoeu)) ### Changed -- Change license to CC0 going forward ([#270](https://github.com/casey/just/pull/270)) +- Change license to CC0 going forward ([#270](https://github.com/casey/just/pull/270) by [casey](https://github.com/casey)) [0.3.1](https://github.com/casey/just/releases/tag/v0.3.1) - 2017-10-06 ----------------------------------------------------------------------- ### Added -- Started keeping a changelog in CHANGELOG.md ([#220](https://github.com/casey/just/pull/220)) -- Recipes whose names begin with an underscore will not appear in `--list` or `--summary` ([#229](https://github.com/casey/just/pull/229)) +- Started keeping a changelog in CHANGELOG.md ([#220](https://github.com/casey/just/pull/220) by [casey](https://github.com/casey)) +- Recipes whose names begin with an underscore will not appear in `--list` or `--summary` ([#229](https://github.com/casey/just/pull/229) by [casey](https://github.com/casey)) diff --git a/crates/update-contributors/src/main.rs b/crates/update-contributors/src/main.rs index 2c957927d4..ef1c18369d 100644 --- a/crates/update-contributors/src/main.rs +++ b/crates/update-contributors/src/main.rs @@ -30,13 +30,9 @@ fn main() { .replace_all( &fs::read_to_string("CHANGELOG.md").unwrap(), |captures: &Captures| { - let pr = captures[1].parse().unwrap(); - match author(pr).as_str() { - "casey" => format!("([#{pr}](https://github.com/casey/just/pull/{pr}))"), - contributor => { - format!("([#{pr}](https://github.com/casey/just/pull/{pr}) by [{contributor}](https://github.com/{contributor}))") - } - } + let pr = captures[1].parse().unwrap(); + let contributor = author(pr); + format!("([#{pr}](https://github.com/casey/just/pull/{pr}) by [{contributor}](https://github.com/{contributor}))") }, ), ) From 4a59769faa4790d2ec09206afd7c661ddc48f54c Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 16:58:31 -0700 Subject: [PATCH 14/26] Add missing changelog credits (#2163) --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f104b083b0..39e24176d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -543,7 +543,7 @@ Changelog - Allow comments on same line as settings ([#1339](https://github.com/casey/just/pull/1339) by [casey](https://github.com/casey)) - Fix justfile env shebang on Linux ([#1330](https://github.com/casey/just/pull/1330) by [casey](https://github.com/casey)) - Update Chinese translation of README.md ([#1325](https://github.com/casey/just/pull/1325) by [hustcer](https://github.com/hustcer)) -- Add additional settings to grammar +- Add additional settings to grammar ([#1321](https://github.com/casey/just/pull/1321) by [psibi](https://github.com/psibi)) - Add an example of using a variable in a recipe parameter ([#1311](https://github.com/casey/just/pull/1311) by [papertigers](https://github.com/papertigers)) [1.4.0](https://github.com/casey/just/releases/tag/1.4.0) - 2022-8-08 @@ -960,7 +960,7 @@ Changelog ### Misc - Test multi-line strings in interpolation ([#789](https://github.com/casey/just/pull/789) by [casey](https://github.com/casey)) - Add shell setting examples to README ([#787](https://github.com/casey/just/pull/787) by [casey](https://github.com/casey)) -- Disable .env warning for now +- Disable .env warning for now ([#786](https://github.com/casey/just/pull/786) by [casey](https://github.com/casey)) - Warn if `.env` file loaded and `dotenv-load` unset ([#784](https://github.com/casey/just/pull/784) by [casey](https://github.com/casey)) [0.9.0](https://github.com/casey/just/releases/tag/v0.9.0) - 2021-3-28 @@ -1283,7 +1283,7 @@ Changelog ### User-visible ### Changed -- Display alias with `--show NAME` if one exists +- Display alias with `--show NAME` if one exists ([#466](https://github.com/casey/just/pull/466) by [casey](https://github.com/casey)) ### Documented - Document multi-line constructs (for/if/while) ([#453](https://github.com/casey/just/pull/453) by [casey](https://github.com/casey)) @@ -1402,7 +1402,7 @@ Changelog ------------------------------------------------------------------------- ### Added -- Implemented invocation_directory function +- Implemented invocation_directory function ([#323](https://github.com/casey/just/pull/323) by [casey](https://github.com/casey)) [0.3.11](https://github.com/casey/just/releases/tag/v0.3.11) - 2018-05-6 ------------------------------------------------------------------------ From 197e1002d035f60f767f2355e7f857dac86b9da2 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 20:04:47 -0700 Subject: [PATCH 15/26] List recipes by group in group justfile order with `just --list --unsorted` (#2164) --- src/subcommand.rs | 18 ++++++++++++++---- tests/groups.rs | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/src/subcommand.rs b/src/subcommand.rs index 9b9a2463b0..c001daa24b 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -500,7 +500,17 @@ impl Subcommand { groups }; - for (i, (group, recipes)) in groups.iter().enumerate() { + let mut ordered = module + .public_groups(config) + .into_iter() + .map(Some) + .collect::>>(); + + if groups.contains_key(&None) { + ordered.insert(0, None); + } + + for (i, group) in ordered.into_iter().enumerate() { if i > 0 { println!(); } @@ -509,14 +519,14 @@ impl Subcommand { if !no_groups { print!("{list_prefix}"); - if let Some(group_name) = group { - println!("[{group_name}]"); + if let Some(group) = &group { + println!("[{group}]"); } else { println!("(no group)"); } } - for recipe in recipes { + for recipe in groups.get(&group).unwrap() { for (i, name) in iter::once(&recipe.name()) .chain(aliases.get(recipe.name()).unwrap_or(&Vec::new())) .enumerate() diff --git a/tests/groups.rs b/tests/groups.rs index 0812852ed4..5dbf6274b3 100644 --- a/tests/groups.rs +++ b/tests/groups.rs @@ -96,6 +96,47 @@ fn list_with_groups_unsorted() { .run(); } +#[test] +fn list_with_groups_unsorted_group_order() { + Test::new() + .justfile( + " + [group('y')] + [group('x')] + f: + + [group('b')] + b: + + [group('a')] + e: + + c: + ", + ) + .args(["--list", "--unsorted"]) + .stdout( + " + Available recipes: + (no group) + c + + [x] + f + + [y] + f + + [b] + b + + [a] + e + ", + ) + .run(); +} + #[test] fn list_groups() { Test::new() From 1c3c1dd3c0802bf77c0e388ee331d00ceb68cf78 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 22:32:07 -0700 Subject: [PATCH 16/26] Add note to readme about quoting paths on Windows (#2166) --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index d369682007..de792badba 100644 --- a/README.md +++ b/README.md @@ -3647,6 +3647,17 @@ Node.js `package.json` files: export PATH := "./node_modules/.bin:" + env_var('PATH') ``` +### Paths on Windows + +On Windows, functions that return paths will return `\`-separated paths. When +not using PowerShell or `cmd.exe` these paths should be quoted to prevent the +`\`s from being intepreted as character escapes: + +```just +ls: + echo '{{absolute_path(".")}}' +``` + ### Alternatives and Prior Art There is no shortage of command runners! Some more or less similar alternatives From 0e8f660d6d6c50359843808594ad2b63f1e62b35 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 14 Jun 2024 22:48:34 -0700 Subject: [PATCH 17/26] Add `datetime()` and `datetime_utc()` functions (#2167) --- README.md | 10 ++++++++++ src/function.rs | 10 ++++++++++ tests/datetime.rs | 27 +++++++++++++++++++++++++++ tests/lib.rs | 1 + 4 files changed, 48 insertions(+) create mode 100644 tests/datetime.rs diff --git a/README.md b/README.md index de792badba..f4d7363e21 100644 --- a/README.md +++ b/README.md @@ -1642,6 +1642,16 @@ which will halt execution. characters. For example, `choose('64', HEX)` will generate a random 64-character lowercase hex string. +#### Datetime + +- `datetime(format)`master - Return local time with `format`. +- `datetime_utc(format)`master - Return UTC time with `format`. + +The arguments to `datetime` and `datetime_utc` are `strftime`-style format +strings, see the +[`chrono` library docs](https://docs.rs/chrono/latest/chrono/format/strftime/index.html) +for details. + #### Semantic Versions - `semver_matches(version, requirement)`1.16.0 - Check whether a diff --git a/src/function.rs b/src/function.rs index 922676228e..dbce9349e1 100644 --- a/src/function.rs +++ b/src/function.rs @@ -47,6 +47,8 @@ pub(crate) fn get(name: &str) -> Option { "config_local_directory" => Nullary(|_| dir("local config", dirs::config_local_dir)), "data_directory" => Nullary(|_| dir("data", dirs::data_dir)), "data_local_directory" => Nullary(|_| dir("local data", dirs::data_local_dir)), + "datetime" => Unary(datetime), + "datetime_utc" => Unary(datetime_utc), "encode_uri_component" => Unary(encode_uri_component), "env" => UnaryOpt(env), "env_var" => Unary(env_var), @@ -235,6 +237,14 @@ fn dir(name: &'static str, f: fn() -> Option) -> FunctionResult { } } +fn datetime(_context: Context, format: &str) -> FunctionResult { + Ok(chrono::Local::now().format(format).to_string()) +} + +fn datetime_utc(_context: Context, format: &str) -> FunctionResult { + Ok(chrono::Utc::now().format(format).to_string()) +} + fn encode_uri_component(_context: Context, s: &str) -> FunctionResult { static PERCENT_ENCODE: percent_encoding::AsciiSet = percent_encoding::NON_ALPHANUMERIC .remove(b'-') diff --git a/tests/datetime.rs b/tests/datetime.rs new file mode 100644 index 0000000000..5092cbe893 --- /dev/null +++ b/tests/datetime.rs @@ -0,0 +1,27 @@ +use super::*; + +#[test] +fn datetime() { + Test::new() + .justfile( + " + x := datetime('%Y-%m-%d %z') + ", + ) + .args(["--eval", "x"]) + .stdout_regex(r"\d\d\d\d-\d\d-\d\d [+-]\d\d\d\d") + .run(); +} + +#[test] +fn datetime_utc() { + Test::new() + .justfile( + " + x := datetime_utc('%Y-%m-%d %Z') + ", + ) + .args(["--eval", "x"]) + .stdout_regex(r"\d\d\d\d-\d\d-\d\d UTC") + .run(); +} diff --git a/tests/lib.rs b/tests/lib.rs index 42b3aff14e..292482f0d1 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -47,6 +47,7 @@ mod completions; mod conditional; mod confirm; mod constants; +mod datetime; mod delimiters; mod directories; mod dotenv; From 71b72c4a5378cdf198ba4273e8ff536f9dfa015f Mon Sep 17 00:00:00 2001 From: Blair Noctis <4474501+nc7s@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:42:16 +0800 Subject: [PATCH 18/26] Remove dependency on cradle (#2169) --- Cargo.lock | 10 ---------- Cargo.toml | 1 - tests/choose.rs | 8 +++++++- tests/edit.rs | 8 +++++++- tests/fmt.rs | 8 +++++++- tests/lib.rs | 1 - 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c2b3e75dfd..5ceb6c1310 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -306,15 +306,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cradle" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7096122c1023d53de7298f322590170540ad3eba46bbc2750b495f098c27c09a" -dependencies = [ - "rustversion", -] - [[package]] name = "crossbeam-deque" version = "0.8.5" @@ -609,7 +600,6 @@ dependencies = [ "clap 4.5.7", "clap_complete", "clap_mangen", - "cradle", "ctrlc", "derivative", "dirs", diff --git a/Cargo.toml b/Cargo.toml index cdb8779072..9e9f0e3c91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,7 +54,6 @@ unicode-width = "0.1.0" uuid = { version = "1.0.0", features = ["v4"] } [dev-dependencies] -cradle = "0.2.0" executable-path = "1.0.0" pretty_assertions = "1.0.0" temptree = "0.2.0" diff --git a/tests/choose.rs b/tests/choose.rs index 0ba1ae396c..001b9ae5d7 100644 --- a/tests/choose.rs +++ b/tests/choose.rs @@ -185,7 +185,13 @@ fn status_error() { "exit-2": "#!/usr/bin/env bash\nexit 2\n", }; - ("chmod", "+x", tmp.path().join("exit-2")).run(); + let output = Command::new("chmod") + .arg("+x") + .arg(tmp.path().join("exit-2")) + .output() + .unwrap(); + + assert!(output.status.success()); let path = env::join_paths( iter::once(tmp.path().to_owned()).chain(env::split_paths(&env::var_os("PATH").unwrap())), diff --git a/tests/edit.rs b/tests/edit.rs index d89efdb73b..2d9840acb4 100644 --- a/tests/edit.rs +++ b/tests/edit.rs @@ -64,7 +64,13 @@ fn status_error() { "exit-2": "#!/usr/bin/env bash\nexit 2\n", }; - ("chmod", "+x", tmp.path().join("exit-2")).run(); + let output = Command::new("chmod") + .arg("+x") + .arg(tmp.path().join("exit-2")) + .output() + .unwrap(); + + assert!(output.status.success()); let path = env::join_paths( iter::once(tmp.path().to_owned()).chain(env::split_paths(&env::var_os("PATH").unwrap())), diff --git a/tests/fmt.rs b/tests/fmt.rs index 1d70a6f9ab..ba050fc3e2 100644 --- a/tests/fmt.rs +++ b/tests/fmt.rs @@ -126,7 +126,13 @@ fn write_error() { let justfile_path = test.justfile_path(); - ("chmod", "400", &justfile_path).run(); + let output = Command::new("chmod") + .arg("400") + .arg(&justfile_path) + .output() + .unwrap(); + + assert!(output.status.success()); let _tempdir = test.run(); diff --git a/tests/lib.rs b/tests/lib.rs index 292482f0d1..932a6c34d6 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -5,7 +5,6 @@ pub(crate) use { tempdir::tempdir, test::{assert_eval_eq, Output, Test}, }, - cradle::input::Input, executable_path::executable_path, just::unindent, libc::{EXIT_FAILURE, EXIT_SUCCESS}, From fcac7ee7687c42bf0bd5b306738e1482f75710a2 Mon Sep 17 00:00:00 2001 From: Ryan McGuire Date: Wed, 19 Jun 2024 01:50:37 -0600 Subject: [PATCH 19/26] Ignore env_logger initialization errors (#2170) --- src/run.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/run.rs b/src/run.rs index 764440ea1c..549a8fe57a 100644 --- a/src/run.rs +++ b/src/run.rs @@ -11,7 +11,8 @@ pub fn run() -> Result<(), i32> { .filter("JUST_LOG") .write_style("JUST_LOG_STYLE"), ) - .init(); + .try_init() + .ok(); let app = Config::app(); From e572b93d84639498c6b646869ebf4e10098e8475 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 19 Jun 2024 16:25:36 -0700 Subject: [PATCH 20/26] Allow passing command-line arguments into `run()` (#2173) --- src/main.rs | 2 +- src/run.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index d580cde810..6eebb2567b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ fn main() { - if let Err(code) = just::run() { + if let Err(code) = just::run(std::env::args_os()) { std::process::exit(code); } } diff --git a/src/run.rs b/src/run.rs index 549a8fe57a..5d8cf836a5 100644 --- a/src/run.rs +++ b/src/run.rs @@ -2,7 +2,7 @@ use super::*; /// Main entry point into just binary. #[allow(clippy::missing_errors_doc)] -pub fn run() -> Result<(), i32> { +pub fn run(args: impl Iterator + Clone>) -> Result<(), i32> { #[cfg(windows)] ansi_term::enable_ansi_support().ok(); @@ -17,7 +17,7 @@ pub fn run() -> Result<(), i32> { let app = Config::app(); info!("Parsing command line arguments…"); - let matches = app.get_matches(); + let matches = app.get_matches_from(args); let config = Config::from_matches(&matches).map_err(Error::from); From 553adc100490c90c6ff5d2e7b049628041ac932a Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 19 Jun 2024 16:38:02 -0700 Subject: [PATCH 21/26] Document library interface (#2174) --- src/lib.rs | 6 ++++++ src/run.rs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index b5b17f4e65..d787ab1c2c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,12 @@ overlapping_range_endpoints )] +//! `just` is primarily used as a command-line binary, but does provide a +//! limited public library interface. +//! +//! Please keep in mind that there are no semantic version guarantees for the +//! library interface. It may break or change at any time. + pub(crate) use { crate::{ alias::Alias, analyzer::Analyzer, argument_parser::ArgumentParser, assignment::Assignment, diff --git a/src/run.rs b/src/run.rs index 5d8cf836a5..38b2233b53 100644 --- a/src/run.rs +++ b/src/run.rs @@ -1,6 +1,7 @@ use super::*; -/// Main entry point into just binary. +/// Main entry point into `just`. Parse arguments from `args` and run. `run()` +/// will exit the proceess if `args` cannot be parsed. #[allow(clippy::missing_errors_doc)] pub fn run(args: impl Iterator + Clone>) -> Result<(), i32> { #[cfg(windows)] From aa43a664ee7ea602ea5bc71c6d49e9bd7201b23f Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 19 Jun 2024 17:18:03 -0700 Subject: [PATCH 22/26] Document remote justfile workaround (#2175) --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index f4d7363e21..9a4b218429 100644 --- a/README.md +++ b/README.md @@ -3668,6 +3668,22 @@ ls: echo '{{absolute_path(".")}}' ``` +### Remote Justfiles + +If you wish to include a `mod` or `import` source file in many `justfiles` +without needing to duplicate it, you can use an optional `mod` or `import`, +along with a recipe to fetch the module source: + +```just +import? 'foo.just' + +fetch: + curl https://raw.githubusercontent.com/casey/just/master/justfile > foo.just +``` + +Given the above `justfile`, after running `just fetch`, the recipes in +`foo.just` will be available. + ### Alternatives and Prior Art There is no shortage of command runners! Some more or less similar alternatives From e4564f45a3ce1cde20334b7fb82f1f9fbab116e8 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Wed, 19 Jun 2024 20:57:46 -0700 Subject: [PATCH 23/26] Don't exit process in `run()` on argument parse error (#2176) --- src/run.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/run.rs b/src/run.rs index 38b2233b53..a74511207c 100644 --- a/src/run.rs +++ b/src/run.rs @@ -1,7 +1,6 @@ use super::*; -/// Main entry point into `just`. Parse arguments from `args` and run. `run()` -/// will exit the proceess if `args` cannot be parsed. +/// Main entry point into `just`. Parse arguments from `args` and run. #[allow(clippy::missing_errors_doc)] pub fn run(args: impl Iterator + Clone>) -> Result<(), i32> { #[cfg(windows)] @@ -18,7 +17,10 @@ pub fn run(args: impl Iterator + Clone>) -> Result<() let app = Config::app(); info!("Parsing command line arguments…"); - let matches = app.get_matches_from(args); + let matches = app.try_get_matches_from(args).map_err(|err| { + err.print().ok(); + err.exit_code() + })?; let config = Config::from_matches(&matches).map_err(Error::from); From af86a471e27e36fc4e9b45067a6a1067241f66f3 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 21 Jun 2024 13:39:34 -0700 Subject: [PATCH 24/26] Don't analyze comments when `ignore-comments` is set (#2180) --- src/analyzer.rs | 2 +- src/recipe_resolver.rs | 7 ++++++- tests/ignore_comments.rs | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/src/analyzer.rs b/src/analyzer.rs index f2e0b6540b..9698284462 100644 --- a/src/analyzer.rs +++ b/src/analyzer.rs @@ -149,7 +149,7 @@ impl<'src> Analyzer<'src> { } } - let recipes = RecipeResolver::resolve_recipes(recipe_table, &self.assignments)?; + let recipes = RecipeResolver::resolve_recipes(&self.assignments, &settings, recipe_table)?; let mut aliases = Table::new(); while let Some(alias) = self.aliases.pop() { diff --git a/src/recipe_resolver.rs b/src/recipe_resolver.rs index 5a962d88bb..c56afeaf3d 100644 --- a/src/recipe_resolver.rs +++ b/src/recipe_resolver.rs @@ -8,8 +8,9 @@ pub(crate) struct RecipeResolver<'src: 'run, 'run> { impl<'src: 'run, 'run> RecipeResolver<'src, 'run> { pub(crate) fn resolve_recipes( - unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>, assignments: &'run Table<'src, Assignment<'src>>, + settings: &Settings, + unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>, ) -> CompileResult<'src, Table<'src, Rc>>> { let mut resolver = Self { resolved_recipes: Table::new(), @@ -39,6 +40,10 @@ impl<'src: 'run, 'run> RecipeResolver<'src, 'run> { } for line in &recipe.body { + if line.is_comment() && settings.ignore_comments { + continue; + } + for fragment in &line.fragments { if let Fragment::Interpolation { expression, .. } = fragment { for variable in expression.variables() { diff --git a/tests/ignore_comments.rs b/tests/ignore_comments.rs index 7cc996e227..c3028a57a3 100644 --- a/tests/ignore_comments.rs +++ b/tests/ignore_comments.rs @@ -97,3 +97,41 @@ fn dont_evaluate_comments() { ) .run(); } + +#[test] +fn dont_analyze_comments() { + Test::new() + .justfile( + " + set ignore-comments + + some_recipe: + # {{ bar }} + ", + ) + .run(); +} + +#[test] +fn comments_still_must_be_parsable_when_ignored() { + Test::new() + .justfile( + " + set ignore-comments + + some_recipe: + # {{ foo bar }} + ", + ) + .stderr( + " + error: Expected '}}', '(', '+', or '/', but found identifier + ——▶ justfile:4:12 + │ + 4 │ # {{ foo bar }} + │ ^^^ + ", + ) + .status(EXIT_FAILURE) + .run(); +} From c900b6f47864b1e1a44102d1992aead3ccae2732 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:42:39 -0700 Subject: [PATCH 25/26] Update `softprops/action-gh-release` (#2183) --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7905090c1f..ca0b748a30 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -95,7 +95,7 @@ jobs: shell: bash - name: Publish Archive - uses: softprops/action-gh-release@v2.0.5 + uses: softprops/action-gh-release@v2.0.6 if: ${{ startsWith(github.ref, 'refs/tags/') }} with: draft: false @@ -105,7 +105,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish Changelog - uses: softprops/action-gh-release@v2.0.5 + uses: softprops/action-gh-release@v2.0.6 if: >- ${{ startsWith(github.ref, 'refs/tags/') From 570d3058cfc8381e03d79e93cf857c510a494f09 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 25 Jun 2024 14:59:42 -0700 Subject: [PATCH 26/26] Link to modules when first introduced in readme (#2193) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a4b218429..dafdb726ac 100644 --- a/README.md +++ b/README.md @@ -656,8 +656,8 @@ Available recipes: lint ``` -Recipes in submodules can be listed with `just --list PATH`, where `PATH` is a -space- or `::`-separated module path: +Recipes in [submodules](#modules1190) can be listed with `just --list PATH`, +where `PATH` is a space- or `::`-separated module path: ``` $ cat justfile @@ -3145,7 +3145,7 @@ import? 'foo/bar.just' Missing source files for optional imports do not produce an error. -### Modules 1.19.0 +### Modules1.19.0 A `justfile` can declare modules using `mod` statements. `mod` statements are currently unstable, so you'll need to use the `--unstable` flag, or set the