diff --git a/CHANGELOG.md b/CHANGELOG.md index ff6b263..a63d947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,32 @@ Changelog ========= +[0.10.6](https://github.com/casey/just/releases/tag/0.10.6) - 2022-1-29 +----------------------------------------------------------------------- + +### Added +- Add windows-powershell setting (#1057) + +### Changed +- Allow using `-` and `@` in any order (#1063) + +### Misc +- Use `Context` suffix for snafu error contexts (#1068) +- Upgrade snafu to 0.7 (#1067) +- Mention "$@" in the README (#1064) +- Note how to use PowerShell with CLI in readme (#1056) +- Link to cheatsheet from readme (#1053) +- Link to Homebrew installation docs in readme (#1049) +- Workflow tweaks (#1045) +- Push to correct origin in publish recipe (#1044) + [0.10.5](https://github.com/casey/just/releases/tag/0.10.5) - 2021-12-4 ----------------------------------------------------------------------- -## Changed +### Changed - Use musl libc for ARM binaries (#1037) -## Misc +### Misc - Make completions work with Bash alias (#1035) - Run tests on PRs (#1040) - Improve GitHub Actions workflow triggers (#1033) diff --git a/Cargo.lock b/Cargo.lock index ced7ebb..ee3f390 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,9 +56,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52d74260d9bf6944e2208aa46841b4b8f0d7ffc0849a06837b2f510337f86b2b" +checksum = "6f3132262930b0522068049f5870a856ab8affc80c70d08b6ecb785771a6fc23" [[package]] name = "cc" @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "cradle" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9473b661a00f1ceccdba920e10a2c35b7c0a73c11c0b14c4d11d25195141d00d" +checksum = "87b52996a34486c5577ea4a2c37dfa25a99eabfab81ca0a3d71711a7d13059ca" dependencies = [ "rustversion", ] @@ -178,14 +178,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ebc5a6d89e3c90b84e8f33c8737933dda8f1c106b5415900b38b9d433841478" [[package]] -name = "getrandom" -version = "0.2.3" +name = "fastrand" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" dependencies = [ - "cfg-if", - "libc", - "wasi", + "instant", ] [[package]] @@ -213,14 +211,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] -name = "itoa" -version = "0.4.8" +name = "instant" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "itoa" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "just" -version = "0.10.5" +version = "0.10.6" dependencies = [ "ansi_term", "atty", @@ -267,9 +274,9 @@ checksum = "441225017b106b9f902e97947a6d31e44ebcf274b91bdbfb51e5c477fcd468e5" [[package]] name = "libc" -version = "0.2.109" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" +checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" [[package]] name = "linked-hash-map" @@ -303,9 +310,9 @@ dependencies = [ [[package]] name = "nix" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f305c2c2e4c39a82f7bf0bf65fb557f9070ce06781d4f2454295cc34b1c43188" +checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" dependencies = [ "bitflags", "cc", @@ -323,12 +330,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ppv-lite86" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" - [[package]] name = "pretty_assertions" version = "1.0.0" @@ -367,62 +368,22 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" dependencies = [ "unicode-xid", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", -] - [[package]] name = "redox_syscall" version = "0.2.10" @@ -475,30 +436,30 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b3909d758bb75c79f23d4736fac9433868679d3ad2ea7a61e3c25cfda9a088" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" [[package]] name = "ryu" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -507,9 +468,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.72" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" +checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" dependencies = [ "itoa", "ryu", @@ -556,9 +517,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static", @@ -602,9 +563,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" +checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" dependencies = [ "proc-macro2", "quote", @@ -619,13 +580,13 @@ checksum = "ba852e71502340e2eaf2fa51f9b3ec6aa25750da1aa65771491c69d67789b05c" [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", "winapi", @@ -701,21 +662,15 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "which" -version = "4.2.2" +version = "4.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" +checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2" dependencies = [ "either", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index c5210ce..4e45201 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "just" -version = "0.10.5" +version = "0.10.6" description = "🤖 Just a command runner" authors = ["Casey Rodarmor "] license = "CC0-1.0" diff --git a/man/just.1 b/man/just.1 index 6dcd19d..d4de6bd 100644 --- a/man/just.1 +++ b/man/just.1 @@ -1,9 +1,9 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5. -.TH JUST "1" "December 2021" "just 0.10.4" "Just Manual" +.TH JUST "1" "January 2022" "just 0.10.6" "Just Manual" .SH NAME just \- save and run commands .SH DESCRIPTION -just 0.10.4 +just 0.10.6 \- Please see https://github.com/casey/just for more information. .SS "USAGE:" .IP @@ -129,11 +129,10 @@ Print before each list item Override with .TP \fB\-\-shell\fR -Invoke to run recipes [default: sh] -.HP +Invoke to run recipes +.TP \fB\-\-shell\-arg\fR ... -.IP -Invoke shell with as an argument [default: \fB\-cu]\fR +Invoke shell with as an argument .TP \fB\-s\fR, \fB\-\-show\fR Show information about diff --git a/src/config.rs b/src/config.rs index 50104b1..d116355 100644 --- a/src/config.rs +++ b/src/config.rs @@ -616,105 +616,6 @@ mod tests { use pretty_assertions::assert_eq; - // This test guards against unintended changes to the argument parser. We should - // have proper tests for all the flags, but this will do for now. - #[test] - fn help() { - const EXPECTED_HELP: &str = "just 0.10.5 -Casey Rodarmor -🤖 Just a command runner \ - - https://github.com/casey/just - -USAGE: - just [FLAGS] [OPTIONS] [--] [ARGUMENTS]... - -FLAGS: - --changelog Print changelog - --check Run `--fmt` in 'check' mode. Exits with 0 if - justfile is formatted correctly. Exits with 1 and - prints a diff if formatting is required. - --choose 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` - --clear-shell-args Clear shell arguments - --dry-run Print what just would do without doing it - --dump Print justfile - -e, --edit Edit justfile with editor given by $VISUAL or - $EDITOR, falling back to `vim` - --evaluate Evaluate and print all variables. If a variable - name is given as an argument, only print that - variable's value. - --fmt Format and overwrite justfile - --highlight Highlight echoed recipe lines in bold - --init Initialize new justfile in project root - -l, --list List available recipes and their arguments - --no-dotenv Don't load `.env` file - --no-highlight Don't highlight echoed recipe lines in bold - -q, --quiet Suppress all output - --shell-command Invoke with the shell used to run recipe - lines and backticks - --summary List names of available recipes - -u, --unsorted Return list and summary entries in source order - --unstable Enable unstable features - --variables List names of variables - -v, --verbose Use verbose output - -OPTIONS: - --chooser - Override binary invoked by `--choose` - - --color - Print colorful output [default: auto] [possible values: auto, - always, never] - -c, --command - Run an arbitrary command with the working directory, `.env`, - overrides, and exports set - --completions - Print shell completion script for [possible values: zsh, - bash, fish, powershell, elvish] - --dotenv-filename - Search for environment file named instead of - `.env` - --dotenv-path - Load environment file at instead of searching for one - - --dump-format - Dump justfile as [default: just] [possible values: just, - json] - -f, --justfile Use as justfile - --list-heading Print before list - --list-prefix - Print before each list item - - --set - Override with - - --shell Invoke to run recipes - --shell-arg ... - Invoke shell with as an argument - - -s, --show - Show information about - - -d, --working-directory - Use as working directory. --justfile must also - be set - -ARGS: - ... Overrides and recipe(s) to run, defaulting to the - first recipe in the justfile"; - - let app = Config::app() - .setting(AppSettings::ColorNever) - .set_term_width(80); - let mut buffer = Vec::new(); - app.write_help(&mut buffer).unwrap(); - let help = str::from_utf8(&buffer).unwrap(); - - assert_eq!(help, EXPECTED_HELP); - } - macro_rules! test { { name: $name:ident,