Commit Graph

485 Commits

Author SHA1 Message Date
Casey Rodarmor
3118ce7211
Make path_exists() relative to current directory (#1122) 2022-02-28 03:09:31 +00:00
Tim Byrne
63f96037c9
Format --init justfile (#1116) 2022-02-23 19:47:43 +00:00
Damian Kula
6271e94bc9
Add path_exists() function (#1106) 2022-02-21 21:45:30 +00:00
Greg Lutostanski
bcdaa95a66
Allow duplicate recipes (#1095) 2022-02-15 02:37:06 +00:00
Casey Rodarmor
5995221555
Change dotenv-load default to false (#1082)
This changes the default value of `dotenv-load` from `true` to `false`. This
is a backwards incompatible change, and will require a minor version bump.
2022-02-02 03:16:35 +00:00
Casey Rodarmor
27cd8fd554
Remove call to sed in justfile (#1078) 2022-01-30 20:16:10 +00:00
Casey Rodarmor
d7897b4510
Release 0.10.6 (#1075)
- Bump version: 0.10.5 → 0.10.6
- Remove config test
- Update changelog
- Update dependencies
- Update man page
2022-01-29 21:18:28 +00:00
Michael Lohr
6cf95a7337
Add windows-powershell setting (#1057) 2022-01-18 19:02:15 +00:00
Casey Rodarmor
edf1fbd83b
Use Context suffix for snafu error contexts (#1068) 2022-01-04 17:45:27 +00:00
Jake Goulding
c89dad9498
Upgrade snafu to 0.7 (#1067) 2022-01-04 16:55:11 +00:00
Casey Rodarmor
3372efefc3
Allow using - and @ in any order (#1063) 2022-01-03 00:51:22 +00:00
Casey Rodarmor
83edb16135
Release 0.10.5 (#1043)
- Bump version: 0.10.4 → 0.10.5
- Update changelog
- Update config test
- Update dependencies
- Update man page
2021-12-05 07:39:50 +00:00
Kurt Wolf
f70b6711a2
Make completions work with Bash alias (#1035) 2021-12-02 03:38:57 +00:00
Casey Rodarmor
1841eb16c6
Release 0.10.4 (#1031)
- Bump version: 0.10.3 → 0.10.4
- Update changelog
- Update config test
- Update dependencies
- Update man page
2021-11-22 01:08:00 +00:00
Casey Rodarmor
0ae91884e2
Add --dump-format json (#992) 2021-11-17 00:07:48 -08:00
David Ringo
53d3c7569c
Use ps1 extension for pwsh shebangs (#1027) 2021-11-17 04:24:29 +00:00
Casey Rodarmor
3ef420ccb3
Add quote(s) function for escaping strings (#1022)
Replace all single quotes with `'\''` and prepend and append single
quotes to `s`. This is sufficient to escape special characters for many
shells, including most Bourne shell descendants.
2021-11-08 19:22:58 +00:00
Casey Rodarmor
8b49c0cbd1
Ignore leading byte order mark in source files (#1021) 2021-11-05 04:35:57 +00:00
Casey Rodarmor
f3abb95c78
Add color to just --fmt --check diff (#1015) 2021-11-01 06:18:11 +00:00
Hoàng Đức Hiếu
1cf8a714e2
fmt: check formatting with --check (#1001) 2021-11-01 04:27:59 +00:00
Casey Rodarmor
9987a0b8ae
Release 0.10.3 (#1014)
- Bump version: 0.10.2 → 0.10.3
- Update changelog
- Update config test
- Update dependencies
- Update man page
2021-10-31 00:55:49 +00:00
Hoàng Đức Hiếu
8eae8c6024
Reword sh not found error messages (#1002) 2021-10-19 07:37:45 +00:00
Casey Rodarmor
58a196f434
Make join accept two or more arguments (#1000) 2021-10-15 00:00:58 +00:00
Casey Rodarmor
6786bb0953
Add trim_end(s) and trim_start(s) functions (#999) 2021-10-14 07:35:15 +00:00
Casey Rodarmor
d6d4b01af4
Add more string manipulation functions (#998) 2021-10-14 07:03:57 +00:00
Casey Rodarmor
9512eb403b
Don't skip variables in variable iterator (#991) 2021-10-09 05:04:13 +00:00
Casey Rodarmor
39301e9f8b
Remove deprecated equals error (#985) 2021-10-02 01:37:28 +00:00
Casey Rodarmor
93f88dc8cf
Release 0.10.2 (#979)
- Bump version: 0.10.1 → 0.10.2
- Update changelog
- Update config test
- Update dependencies
- Update man page
- Bump MSRV to 1.47 for libc
2021-09-29 03:04:24 +00:00
Casey Rodarmor
0db4589efe
Implement regular expression match conditionals (#970) 2021-09-16 23:45:56 +00:00
Casey Rodarmor
09af9bb5e5
Change MSRV to 1.46.0 (#968) 2021-09-16 14:51:45 +00:00
Casey Rodarmor
629c75ff04
Use stable rustfmt instead of nightly (#967) 2021-09-16 13:44:40 +00:00
Casey Rodarmor
fe0d0f46fa
Release 0.10.1 (#958)
- Bump version: 0.10.0 → 0.10.1
- Update changelog
- Update config test
- Update dependencies
- Update man page
2021-08-28 00:21:59 +00:00
Casey Rodarmor
dbf142369b
Bump target version to 2.0 (#957) 2021-08-27 23:36:41 +00:00
Matt Boulanger
e72e7dd569
Add flags for specifying name and path environment file (#941) 2021-08-08 22:37:35 -07:00
Casey Rodarmor
f5689617f4
Wrap --help text to terminal width (#940) 2021-08-05 01:03:22 +00:00
Casey Rodarmor
289accada9
Release 0.10.0 (#934)
- Bump version: 0.9.9 → 0.10.0
- Update changelog
- Update config test
- Update dependencies
- Update man page
2021-08-03 01:33:40 +00:00
Casey Rodarmor
5bb4b4a382
Add --changelog subcommand (#932) 2021-07-31 20:53:27 +00:00
Casey Rodarmor
9c3bbc9fa7
Support .justfile as an alternative to justfile (#931) 2021-07-31 19:25:49 +00:00
Casey Rodarmor
7efb82f4cb
Fix colors (#927)
- Re-enable error colors
- Color argument count mismatch usage string
2021-07-29 01:27:47 +00:00
Casey Rodarmor
27cf2b96df
Use ColorDisplay trait to print objects to the terminal (#926) 2021-07-29 01:06:57 +00:00
Casey Rodarmor
1f20ca6481
Warn if .env file is loaded in dotenv-load isn't explicitly set (#925)
If a `.env` file is found and loaded, but the `dotenv-load` setting hasn't been explicitly
set to true, print a warning to stderr. In approximately six months, `dotenv-load` will
change from defaulting to true to defaulting to false, which will be a potentially breaking
change in behavior for justfiles which elicit this warning.

See this issue for more details:

    https://github.com/casey/just/issues/469
2021-07-28 07:33:44 +00:00
Casey Rodarmor
9ee1a63e99
Deduplicate recipe parsing (#923) 2021-07-28 05:51:46 +00:00
Casey Rodarmor
ce0376cfdf
Move subcommand functions into Subcommand (#918) 2021-07-27 00:19:52 +00:00
Casey Rodarmor
1b0fafea75
Add loader and refactor errors (#917)
This commit adds a `Loader` type, which can be used to load multiple
source strings. This was done to support the work on modules, but
coincidentally enabled consolidating errors, since now `Config::run`
can take a `&Loader`, and in the event of an error, return and `Error`
that borrows from loaded strings. Multiple error types have been
consolidated, and a bunch of ad-hoc error printing was removed.
2021-07-26 01:26:06 -07:00
Casey Rodarmor
98457c05d7
Rename: Module → Ast (#915) 2021-07-24 03:26:27 +00:00
Casey Rodarmor
2a4c5ae0f0
Release 0.9.9 (#913)
- Bump version: 0.9.8 → 0.9.9
- Update changelog
- Update config test
- Update dependencies
- Update man page
2021-07-22 07:56:36 +00:00
Casey Rodarmor
77bba3ee0e
Add subsequent dependencies (#820)
Subsequents are dependencies which run after a recipe instead of prior.
Subsequents to a recipe only run if the recipe succeeds. Subsequents
will run even if a matching invocation already ran as a prior
dependencies.
2021-07-22 00:20:25 -07:00
Casey Rodarmor
c76805ab9e
Implement else if chaining (#910) 2021-07-20 01:21:46 +00:00
Casey Rodarmor
0fea73455b
Fix circular variable dependency error message (#909) 2021-07-20 01:10:35 +00:00
Casey Rodarmor
32f3132997
Release 0.9.8 (#896)
- Bump version: 0.9.7 → 0.9.8
- Update man page
- Update config test
- Update changelog
2021-07-03 23:58:58 +00:00
Casey Rodarmor
6272151551
Release 0.9.7 (#893)
- Bump version: 0.9.6 → 0.9.7
- Update dependencies
- Update man page
- Update config test
- Update changelog
2021-07-03 21:39:41 +00:00
Casey Rodarmor
d797592365
Remove test-utilities crate (#892) 2021-07-03 21:26:59 +00:00
Liam
a24c86ed5a
Add string manipulation functions (#888) 2021-07-03 19:39:45 +00:00
Casey Rodarmor
7aaa20a976
Release v0.9.6 (#884)
- Bump version: 0.9.5 → 0.9.6
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-06-24 23:56:27 -07:00
Casey Rodarmor
024f8279bc
Add clean function for simplifying paths (#883) 2021-06-25 06:41:20 +00:00
Casey Rodarmor
87e395254b
Add join function for joining paths (#882) 2021-06-24 22:55:29 +00:00
Antonio Gelameris
162d2df1ba
Add path manipulation functions (#872) 2021-06-17 07:56:09 +00:00
Casey Rodarmor
4a82c45dda
Release v0.9.5 (#870)
- Bump version: 0.9.4 → 0.9.5
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-06-12 22:49:27 +00:00
Casey Rodarmor
a6453ded99
Add --unstable flag (#869)
Add an `--unstable` flag, indicating that `just` should enable unstable
features. Make `--fmt` only run if `--unstable` is passed.
2021-06-12 22:34:41 +00:00
Oleksii Dorozhkin
8677492d56
Add --fmt subcommand (#837) 2021-06-08 01:01:27 -07:00
Casey Rodarmor
0a9ffd7a7b
Remove v prefix from version (#850) 2021-06-01 23:37:40 +00:00
Casey Rodarmor
c198099c17
Release v0.9.4 (#844)
* Release v0.9.4

- Bump version: 0.9.3 → 0.9.4
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-05-28 01:22:59 +00:00
Casey Rodarmor
a6b13a31b6
Refactor shebang handling (#833) 2021-05-18 03:44:12 +00:00
Casey Rodarmor
48f00865f9
Release v0.9.3 (#832)
- Bump version: 0.9.2 → 0.9.3
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-05-16 11:11:34 -05:00
Lynx Zhou
7be66f890f
Add shebang support for 'cmd.exe' (#828) 2021-05-16 00:33:41 -05:00
sigoden
cba52c9d65
Add .exe to powershell scripts (#826) 2021-05-11 12:21:49 -07:00
Casey Rodarmor
50cd24d37b
Add the --command subcommand (#824) 2021-05-10 03:35:35 +00:00
Casey Rodarmor
4cb82e0c1f
Remove summary feature (#823)
Remove the `summary` feature and make the `summary` module always build.
It's a small module, so it shouldn't hurt compile times, and it should
prevent accidental breakages that are only caught on CI.
2021-05-08 19:07:51 -07:00
Casey Rodarmor
7bc9d3986e
Fix bang lexing and placate clippy (#821) 2021-05-07 00:14:38 -07:00
Casey Rodarmor
cde2ce0d87
Release v0.9.2 (#811)
- Bump version: 0.9.1 → 0.9.2
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-05-02 10:35:45 +00:00
Casey Rodarmor
2abdeb386e
Pass evaluated arguments as positional arguments (#810) 2021-05-02 10:25:43 +00:00
Casey Rodarmor
7889f10a6a
Release v0.9.1 (#807)
- Bump version: 0.9.0 → 0.9.1
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-04-25 17:25:34 -07:00
Casey Rodarmor
09b370e10d
Change --eval to print variable value only (#806) 2021-04-25 17:02:57 -07:00
Casey Rodarmor
67bd318bf9
Add positional-arguments setting (#804)
Allow recipe arguments to be passed as positional arguments to commands.
2021-04-24 18:29:58 -07:00
Casey Rodarmor
d03aedd5c4
Allow filtering variables to evaluate (#795)
If variable names are passed to `--evaluate`, only print those
variables.
2021-04-05 21:50:50 -07:00
Casey Rodarmor
fec979c2c6
Reform and improve string literals (#793)
- Combine and simplify string and backtick lexing.
- Allow newlines in strings and backticks.
- Add triple-delimited indented strings and backticks. Common indented literal non-blank line leading whitespace is stripped.
- If a literal newline is escaped, it will be suppressed.
- Backticks starting with `#!` are reserved for a future upgrade.
2021-04-05 21:28:37 -07:00
Casey Rodarmor
da97f8d7dd
Allow evaluating justfiles with no recipes (#794) 2021-04-05 21:17:53 -07:00
Casey Rodarmor
dd578d141c
Unify string lexing (#790)
Unify lexing of backticks, cooked strings, and raw strings. Also allow
newlines in backticks and cooked strings, since I can't think of a reason
not to.
2021-04-04 16:41:02 -07:00
Casey Rodarmor
78b67f6cae
Test multi-line strings in interpolation (#789)
The behavior here is strange, and unintentional, but not obviously wrong.
Add a test to make sure I don't accidentally break it in the future.
2021-04-03 19:59:13 -07:00
Casey Rodarmor
a1a016b4e0
Disable .env warning for now 2021-03-30 17:59:15 -07:00
Casey Rodarmor
e4ebf6dad9
Warn if .env file loaded and dotenv-load unset (#784) 2021-03-30 17:30:32 -07:00
Casey Rodarmor
6e2e540751
Release v0.9.0 (#781)
- Bump version: 0.8.7 → 0.9.0
- Update changelog
- Update man page
- Update config test
2021-03-28 23:47:10 -07:00
Casey Rodarmor
10282bd636
Turn = deprecation warning into a hard error (#780)
It's been around two and a half years, and many versions, since this
warning was first introduced, so it feels reasonable to finally turn it
into a hard error. It will remain a special-cased error for a little
while.
2021-03-28 23:39:23 -07:00
Casey Rodarmor
4e2e10177b
Release v0.8.7 (#779)
- Bump version: 0.8.6 → 0.8.7
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-03-28 22:50:22 -07:00
Casey Rodarmor
18b9799e8d
Add dotenv-load setting (#778)
The `dotenv-load` setting controls whether or not a `.env` file will be
loaded if present. It currently defaults to true.
2021-03-28 22:38:07 -07:00
Casey Rodarmor
d81d17ba0a
Release v0.8.6 (#776)
- Bump version: 0.8.5 → 0.8.6
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-03-28 16:02:56 -07:00
Benoit de Chezelles
13e9f406c8
Add just_executable() function (#775)
The `just_executable()` function returns the absolute path of the
currently running `just` executable.
2021-03-28 15:44:02 -07:00
Casey Rodarmor
6f42c8b737
Prefix parameters with $ to export to environment (#773)
If a parameter is prefixed with an `$`, it will be exported as an
environment variable.
2021-03-25 18:35:24 -07:00
Casey Rodarmor
122c351eba
Improve chooser invocation error message (#772)
Since the chooser is invoked via the shell, print out the full shell
command line, instead of just the chooser.
2021-03-25 17:44:18 -07:00
Casey Rodarmor
b66a979c08
Add set export to export all variables as environment variables (#767)
Add a setting that exports all variables by default, regardless of
whether they use the `export` keyword. This includes assignments as well
as parameters.

Just does dependency analysis of variable uses, allowing variables to be
used out of order in assignments, as long as there are no circular
dependencies.

However, use of environment variable is not known to Just, so exported
variables are only exported to child scopes, to avoid ordering dependencies,
since dependency analysis cannot be done.
2021-03-25 17:00:32 -07:00
Casey Rodarmor
86c2e52dc6
Suppress all output to stderr when --quiet (#771)
Suppress all warnings and error messages when `--quiet` is passed.
2021-03-25 16:51:29 -07:00
Casey Rodarmor
9eb774e2ce
Fix warnings (#770) 2021-03-25 15:27:26 -07:00
Casey Rodarmor
21f5e75395
Release v0.8.5 (#766)
- Bump version: 0.8.4 → 0.8.5
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-03-24 20:21:20 -07:00
Casey Rodarmor
d3b277c04c
Allow escaping double braces with {{{{ (#765) 2021-03-24 19:46:53 -07:00
Casey Rodarmor
7ae890ce61
Note shebang line splitting inconsistency in readme (#757) 2021-02-15 01:18:31 -08:00
Casey Rodarmor
c647efa200
Release v0.8.4 (#754)
- Bump version: 0.8.3 → 0.8.4
- Update dependencies
- Update changelog
- Update man page
- Update config test
2021-02-09 01:20:57 -08:00
Casey Rodarmor
bac851ff68
Add options to control list formatting (#753)
Add the `--list-heading` option, to override the heading text printed
before a list, defaulting to `Available recipes:\n`, and
`--list-prefix`, to override the indentation before each list item.
2021-02-09 01:00:20 -08:00
Casey Rodarmor
a14bc8c951
Implement Default for Table (#748) 2021-01-22 23:34:01 -08:00
Casey Rodarmor
1fc4842e4c
Fix CI (#727)
- Replace `::add-path::` CI command with environment files
- Placate Clippy
- Consolidate cache actions
2020-11-19 14:47:04 -08:00
Casey Rodarmor
19f986d495
Release v0.8.3 (#718)
- Bump version: 0.8.2 → 0.8.3
- Update changelog
- Update config test
2020-10-28 00:04:53 -07:00