diff --git a/CHANGELOG.md b/CHANGELOG.md index 873f06b..0fe5d6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,26 @@ Changelog ========= +[v0.9.1] - 2020-4-24 +-------------------- + +### Added +- Change `--eval` to print variable value only (#806) +- Add `positional-arguments` setting (#804) +- Allow filtering variables to evaluate (#795) + +### Changed +- Reform and improve string literals (#793) +- Allow evaluating justfiles with no recipes (#794) +- Unify string lexing (#790) + +### Misc +- Test multi-line strings in interpolation (#789) +- Add shell setting examples to README (#787) +- Disable .env warning for now +- Warn if `.env` file loaded and `dotenv-load` unset (#784) + + [v0.9.0] - 2020-3-28 -------------------- diff --git a/Cargo.lock b/Cargo.lock index 8196e87..c3e6662 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.1.8" +version = "3.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15b8ec3b5755a188c141c1f6a98e76de31b936209bf066b647979e2a84764a9" +checksum = "232295399409a8b7ae41276757b5a1cc21032848d42bff2352261f958b3ca29a" dependencies = [ "nix", "winapi", @@ -188,7 +188,7 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "just" -version = "0.9.0" +version = "0.9.1" dependencies = [ "ansi_term 0.12.1", "atty", @@ -220,9 +220,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" +checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41" [[package]] name = "log" @@ -268,9 +268,9 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "pretty_assertions" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f297542c27a7df8d45de2b0e620308ab883ad232d06c14b76ac3e144bda50184" +checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b" dependencies = [ "ansi_term 0.12.1", "ctor", @@ -280,9 +280,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ "unicode-xid", ] @@ -338,18 +338,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +checksum = "8270314b5ccceb518e7e578952f0b72b88222d02e8f77f5ecf7abbb673539041" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.5" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" +checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" dependencies = [ "aho-corasick", "memchr", @@ -421,9 +421,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.67" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702" +checksum = "b9505f307c872bab8eb46f77ae357c8eba1fdacead58ee5a850116b1d7f82883" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c4bff70..bf96eb7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "0.9.0" +version = "0.9.1" description = "🤖 Just a command runner" authors = ["Casey Rodarmor "] license = "CC0-1.0" diff --git a/completions/just.elvish b/completions/just.elvish index 9d3258c..e49cf35 100644 --- a/completions/just.elvish +++ b/completions/just.elvish @@ -43,7 +43,7 @@ edit:completion:arg-completer[just] = [@words]{ cand --dump 'Print entire justfile' cand -e 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' cand --edit 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' - cand --evaluate 'Evaluate and print all variables. If positional arguments are present, only print the variables whose names are given as arguments.' + cand --evaluate 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.' cand --init 'Initialize new justfile in project root' cand -l 'List available recipes and their arguments' cand --list 'List available recipes and their arguments' diff --git a/completions/just.fish b/completions/just.fish index 5cdfd50..87f27ca 100644 --- a/completions/just.fish +++ b/completions/just.fish @@ -31,7 +31,7 @@ complete -c just -n "__fish_use_subcommand" -s v -l verbose -d 'Use verbose outp complete -c just -n "__fish_use_subcommand" -l choose -d 'Select one or more recipes to run using a binary. If `--chooser` is not passed the chooser defaults to the value of $JUST_CHOOSER, falling back to `fzf`' complete -c just -n "__fish_use_subcommand" -l dump -d 'Print entire justfile' complete -c just -n "__fish_use_subcommand" -s e -l edit -d 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`' -complete -c just -n "__fish_use_subcommand" -l evaluate -d 'Evaluate and print all variables. If positional arguments are present, only print the variables whose names are given as arguments.' +complete -c just -n "__fish_use_subcommand" -l evaluate -d 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable\'s value.' complete -c just -n "__fish_use_subcommand" -l init -d 'Initialize new justfile in project root' complete -c just -n "__fish_use_subcommand" -s l -l list -d 'List available recipes and their arguments' complete -c just -n "__fish_use_subcommand" -l summary -d 'List names of available recipes' diff --git a/completions/just.powershell b/completions/just.powershell index c4e79c6..b33fdb0 100644 --- a/completions/just.powershell +++ b/completions/just.powershell @@ -48,7 +48,7 @@ Register-ArgumentCompleter -Native -CommandName 'just' -ScriptBlock { [CompletionResult]::new('--dump', 'dump', [CompletionResultType]::ParameterName, 'Print entire justfile') [CompletionResult]::new('-e', 'e', [CompletionResultType]::ParameterName, 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`') [CompletionResult]::new('--edit', 'edit', [CompletionResultType]::ParameterName, 'Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`') - [CompletionResult]::new('--evaluate', 'evaluate', [CompletionResultType]::ParameterName, 'Evaluate and print all variables. If positional arguments are present, only print the variables whose names are given as arguments.') + [CompletionResult]::new('--evaluate', 'evaluate', [CompletionResultType]::ParameterName, 'Evaluate and print all variables. If a variable name is given as an argument, only print that variable''s value.') [CompletionResult]::new('--init', 'init', [CompletionResultType]::ParameterName, 'Initialize new justfile in project root') [CompletionResult]::new('-l', 'l', [CompletionResultType]::ParameterName, 'List available recipes and their arguments') [CompletionResult]::new('--list', 'list', [CompletionResultType]::ParameterName, 'List available recipes and their arguments') diff --git a/completions/just.zsh b/completions/just.zsh index 705aeee..b08318d 100644 --- a/completions/just.zsh +++ b/completions/just.zsh @@ -44,7 +44,7 @@ _just() { '--dump[Print entire justfile]' \ '-e[Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`]' \ '--edit[Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`]' \ -'--evaluate[Evaluate and print all variables. If positional arguments are present, only print the variables whose names are given as arguments.]' \ +'--evaluate[Evaluate and print all variables. If a variable name is given as an argument, only print that variable'\''s value.]' \ '--init[Initialize new justfile in project root]' \ '-l[List available recipes and their arguments]' \ '--list[List available recipes and their arguments]' \ diff --git a/man/just.1 b/man/just.1 index a5d0bfe..6b2e1da 100644 --- a/man/just.1 +++ b/man/just.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.15. -.TH JUST "1" "March 2021" "just 0.9.0" "Just Manual" +.TH JUST "1" "April 2021" "just 0.9.1" "Just Manual" .SH NAME just \- save and run commands .SH DESCRIPTION -just 0.9.0 +just 0.9.1 \- Please see https://github.com/casey/just for more information. .SS "USAGE:" .IP @@ -27,7 +27,8 @@ Print entire justfile Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim` .TP \fB\-\-evaluate\fR -Print evaluated variables +Evaluate and print all variables. If a variable name is given as an argument, only print +that variable's value. .TP \fB\-\-highlight\fR Highlight echoed recipe lines in bold diff --git a/src/config.rs b/src/config.rs index b133952..00401a1 100644 --- a/src/config.rs +++ b/src/config.rs @@ -247,8 +247,8 @@ impl Config { .help("Edit justfile with editor given by $VISUAL or $EDITOR, falling back to `vim`"), ) .arg(Arg::with_name(cmd::EVALUATE).long("evaluate").help( - "Evaluate and print all variables. If positional arguments are present, only print the \ - variables whose names are given as arguments.", + "Evaluate and print all variables. If a variable name is given as an argument, only print \ + that variable's value.", )) .arg( Arg::with_name(cmd::INIT) @@ -867,7 +867,7 @@ mod tests { // have proper tests for all the flags, but this will do for now. #[test] fn help() { - const EXPECTED_HELP: &str = "just v0.9.0 + const EXPECTED_HELP: &str = "just v0.9.1 Casey Rodarmor 🤖 Just a command runner \ - https://github.com/casey/just @@ -884,9 +884,9 @@ FLAGS: --dump Print entire justfile -e, --edit Edit justfile with editor given by $VISUAL or $EDITOR, falling back \ to `vim` - --evaluate Evaluate and print all variables. If positional arguments are \ - present, only print the - variables whose names are given as arguments. + --evaluate Evaluate and print all variables. If a variable name is given as an \ + argument, only print + that variable's value. --highlight Highlight echoed recipe lines in bold --init Initialize new justfile in project root -l, --list List available recipes and their arguments