Commit Graph

432 Commits

Author SHA1 Message Date
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
Casey Rodarmor
aa506fa5bd
Allow ignore line endings inside delimiters (#717)
Modify the lexer to keep track of opening `({[` and closing `]})` delimiters.
When the lexer would emit an eol or indent outside of a recipe when there
is at least one open delimiter, emit a whitespace token instead.

This allows expressions to be split on multiple lines, like so:

    x := if 'a' == 'b' {
      'x'
    } else {
      'y'
    }

This does not work inside of recipe body interpolations, although this
restriction might relaxed in the future.
2020-10-27 23:51:17 -07:00
Casey Rodarmor
70768eb24c
Release v0.8.2 (#715)
- Bump version: 0.8.1 → 0.8.2
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-10-26 18:30:23 -07:00
Casey Rodarmor
19f7ad09a7
Add conditional expressions (#714)
Add conditional expressions of the form:

   foo := if lhs == rhs { then } else { otherwise }

`lhs`, `rhs`, `then`, and `otherwise` are all arbitrary expressions, and
can recursively include other conditionals. Conditionals short-circuit,
so the branch not taken isn't evaluated.

It is also possible to test for inequality with `==`.
2020-10-26 18:16:42 -07:00
Casey Rodarmor
3643a0dff0
Add Parser::forbid (#712) 2020-10-25 23:57:08 -07:00
Casey Rodarmor
bdf1c92251
Automatically track expected tokens while parsing (#711)
Remove all manual tracking of which tokens would have been accepted by
the parser in favor of having the parser add tokens that it checks for
to a set of expected tokens, clearing them when it accepts a token, and
using the current contents of the set in error messages.

This is a massive improvement, and will make the parser easier to
modify going forward.

And, this actually solves my sole issue with hand-written parsers.

Thanks to matklad on reddit for suggesting this!
2020-10-25 19:37:26 -07:00
Zhenhui Xie
0e1af65565
Allow completing variables and recipes after --set in zsh completion script (#697) 2020-10-17 21:58:44 -07:00
Casey Rodarmor
b64718b295
Release v0.8.1 (#707)
- Bump version: 0.8.0 → 0.8.1
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-10-15 20:17:38 -07:00
Casey Rodarmor
d1efc18174
Allow choosing multiple recipes to run (#700)
Modifies the `--choose` subcommand to allow a chooser to return
space-separated recipe names recipes to run.
2020-10-10 17:54:58 -07:00
Casey Rodarmor
526badbd6f
Placate clippy (#698) 2020-10-09 15:44:17 -07:00
Chris Nantau
fbda8dd2c7
Complete recipes names in PowerShell completion script (#651) 2020-10-05 19:12:48 -07:00
Vikesh Raj
a8361012d6
Complete recipes in bash completion script (#685)
Modifies the bash completion script to complete both recipes and flags.
`just <TAB>` will complete recipes, and `just -<TAB>` will complete
flags and options.
2020-10-05 17:58:30 -07:00
Casey Rodarmor
935f1130ac
Release v0.8.0 (#691)
- Bump version: 0.7.3 → 0.8.0
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-10-03 14:32:53 -07:00
Will Speak
9bd0720aa1
Allow suppressing failures with - prefix (#687)
If a command in a linewise recipe is prefixed with `-`, then the exit
status is ignored and execution continues.
2020-10-03 13:54:19 -07:00
Matt Boulanger
991f42d4ac
Move separate quiet config value to verbosity (#686)
Moves the separate quiet variable in the `Config` struct into the existing
verbosity field; the `Verbosity` enum now has a `Quiet` variant. When running, the
presence of the quiet flag will set the verbosity to `Quiet`, overriding any
number of verbosity flags in the CLI args.
2020-10-01 20:00:15 -07:00
Casey Rodarmor
d3ec3e4ce8
Release v0.7.3 (#681)
- Bump version: 0.7.2 → 0.7.3
- Update changelog
- Update man page
- Update config test
2020-09-17 19:51:46 -07:00
Casey Rodarmor
9d0246998d
Add the --choose subcommand (#680)
The `--choose` subcommand runs a chooser to select a recipe to run. The
chooser should read lines containing recipe names from standard input,
and write one of those names to standard output.

The chooser defaults to `fzf`, a popular fuzzy finder, but can be
overridden by setting $JUST_CHOOSER or passing `--chooser <CHOOSER>`.
2020-09-17 19:43:04 -07:00
Casey Rodarmor
55985aa242
Combine integration tests into single binary (#679)
Combine all integration test binaries into a single binary with the root
in `tests/lib.rs`. This also turns of automatic test discovery, so
when adding another set of integration tests, a mod statement will need
to be added to `tests/lib.rs`.
2020-09-17 17:59:46 -07:00
Casey Rodarmor
551a22b5fc
Release v0.7.2 (#670)
- Bump version: 0.7.1 → 0.7.2
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-08-23 20:21:08 -07:00
Casey Rodarmor
9ecfd2bef4
Add option to print recipes in source order (#669)
Add an `--unsorted` flag, which makes `--list` and `--summary` print
their entries in source order.
2020-08-21 15:13:54 -07:00
Casey Rodarmor
981465ad30
Release v0.7.1 (#662)
- Bump version: 0.7.0 → 0.7.1
- Update changelog
- Update man page
- Update config test
2020-07-19 05:10:38 -07:00
Casey Rodarmor
05d73a423a
Search for .env file from working directory (#661)
Search for a `.env` file starting in the  working directory, instead of
the invocation directory.
2020-07-19 05:01:46 -07:00
Casey Rodarmor
c1a0001939
Release v0.7.0 (#657)
- Bump version: 0.6.1 → 0.7.0
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-07-16 21:58:49 -07:00
Casey Rodarmor
837b6e6a00
Skip .env items which are set in environment (#656)
If an environment variable exists with the same key as a variable from a
`.env` file, skip the variable from the `.env` file in favor fo the key
from the environment.
2020-07-16 21:37:33 -07:00
Casey Rodarmor
7384307fdc
Release v0.6.1 (#653)
- Bump version: 0.6.0 → 0.6.1
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-06-28 15:07:03 -07:00
Casey Rodarmor
5533073f56
Only use cygpath on shebang if it contains / (#652)
On Windows, skip conversion if a shebang path does not include `/`. In
this case it is not a Unix path, and does not need to be converted to a
Windows path before running.
2020-06-27 16:38:56 -07:00
Casey Rodarmor
863fb53885
Release v0.6.0 (#649)
- Bump version: 0.5.11 -> 0.6.0
- Update dependencies
- Update changelog
- Update man page
- Update config test
2020-06-18 11:50:47 -07:00
Richard Berry
1ff619295c
Add variadic parameters that accept zero or more arguments (#645)
Add "star" variadic parameters that accept zero or more arguments,
distinguished with a `*` in front of the parameter name.
2020-06-13 01:49:13 -07:00
Richard Berry
89ee05227b
Ignore '@' returned from interpolation evaluation (#636)
Only process literal `@` characters outside of interpolation evaluation.
2020-06-09 15:16:05 -07:00
Casey Rodarmor
2a9c29c18f
Strip leading spaces after line continuation (#635)
Make line continuations strip leading spaces on the next line.

This changes what is passed to the shell, so this is a breaking change.
However, I don't think that this will break any recipes.
2020-06-08 22:37:12 -07:00
Casey Rodarmor
2e6e48d8f4
Release v0.5.11 (#629)
- Bump version: `0.5.10` -> `0.5.11`
- Update changelog
- Update dependencies
- Update man page
- Update config test
- Publish to cargo last in release recipe
2020-05-23 20:59:11 -07:00
Casey Rodarmor
d6a1a2b568
Don't load .env file when --no-dotenv is passed (#627)
Add a `--no-dotenv` flag that suppresses loading `.env` files.
2020-05-23 20:41:12 -07:00
Tobin Yehle
fef69a3ec1
Complete recipe names in fish completion script (#625) 2020-05-03 20:35:53 -07:00
Matt Boulanger
dc7210bca3
Suggest aliases for unknown recipes (#624) 2020-04-26 14:19:21 -07:00
Casey Rodarmor
f73de24fd7
Add log variable to justfile (#621)
Allows logging to be controlled with, for example:

    just log=trace run
2020-03-31 00:00:05 -07:00
Casey Rodarmor
985a6a833d
Release v0.5.10 (#613)
- Bump version: `0.5.9` -> `0.5.10`
- Update changelog
- Update dependencies
- Update man page
- Update config test
- Fix publish and check recipes
2020-03-18 09:03:21 -07:00
Casey Rodarmor
8fea09a3dd
Release v0.5.9 (#612)
- Bump version number: `0.5.8` -> `0.5.9`
- Update changelog
- Update dependencies
- Update config test
- Add `pr` and `push` to justfile
2020-03-18 08:19:43 -07:00
Zhenhui Xie
e79482f2dc
Update zsh completion file (#606)
- Complete variable names after `--set`
- Complete recipe names
- Display recipe signature and body below command line
- Modify completions subcommand to produce enhanced zsh completion script
2020-03-16 17:20:14 -07:00
Casey Rodarmor
784232e98b
Trim completions and ensure final newline (#609)
Trim whitespace at beginning and end of generated completions.
Additionally, since some editors will automatically insert a final
newline into text files, make sure a final newline is present.
2020-03-14 21:41:57 -07:00
Casey Rodarmor
1dbc765390
Add --variables subcommand that prints variable names (#608)
Add a subcommand that prints out a space-separated list of the names of
top-level variables in the justfile.

The syntax is:

    $ just --variables
    a b c

This can be used for any purpose, but is mostly intended for completion
scripts, so that they can get the names of variables without using
`--evaluate`.

Additionally:

- Add `bin/generate-completions` script to regenerate checked-in
  completions
- Update dependencies
- Regenerate checked-in completions
2020-03-13 22:19:43 -07:00
Casey Rodarmor
2b688d4858
Trigger build on pushes and pull requests (#607) 2020-03-13 21:20:41 -07:00
Casey Rodarmor
dcc98abdf8
Don't require justfile to print completions (#596)
Currently, the `--completions` subcommand will fail if there is no
justfile present. A justfile isn't needed to print completions, so fix
this.
2020-02-20 06:07:25 -08:00
Casey Rodarmor
9731278d2a
Wrap comments at 80 characters (#593)
I think 70 is too agressive, especially since it includes indentation
when determining line length.
2020-02-14 04:49:25 -08:00
Casey Rodarmor
3ec7dea4a3
Use unstable rustfmt configuration options (#592) 2020-02-10 20:07:06 -08:00
Casey Rodarmor
aceee3e217
Release v0.5.7 (#591)
- Bump version: v0.5.7 -> v0.5.8
- Update changelog
- Update man page
- Update config test
- Update dependencies
2020-02-06 12:25:09 -08:00
Casey Rodarmor
b1ebf63124
Improve comments in justfile (#588) 2020-01-31 00:47:48 -08:00
Casey Rodarmor
1629235f2e
Only use cygpath on windows if present (#586) 2020-01-28 18:02:58 -08:00
Casey Rodarmor
1d084f1d4e
Release v0.5.7 (#584)
- Bump version: 0.5.6 -> 0.5.7
- Update change log
- Update man page
- Update config test
2020-01-28 03:03:07 -08:00
Casey Rodarmor
f3d5d124a4
Release v0.5.6 (#582)
- Bump version: 0.5.5 -> 0.5.6
- Update change log
- Update man page
- Update config test
2020-01-28 02:31:38 -08:00
Casey Rodarmor
56496e14bf
Release v0.5.5 (#576)
- Bump version: 0.5.4 -> 0.5.5
- Update changelog
- Update man page
- Update config test
2020-01-15 03:33:49 -08:00
Casey Rodarmor
f50196a67f
Check long lines and FIXME/TODO on CI (#575) 2020-01-15 02:30:24 -08:00
Casey Rodarmor
ed991cb509
Add additional continuous integration checks (#574)
Add GitHub Actions checks:

- Clippy is placated
- Rustfmt doesn't produce any changes
- Shell completion scripts are current
2020-01-15 02:16:13 -08:00
Casey Rodarmor
85e8015702
Generate shell completion scripts with --completions (#572)
Make just print clap-generated shell completion scripts with `--completions`
command. Currently, Bash, Zsh, Fish, PowerShell, and Elvish are supported.

Additionally, the generated completion scripts are checked in to the
`completions` folder.
2020-01-15 01:20:38 -08:00
Casey Rodarmor
e14447030a
Release v0.5.4 (#570)
- Bump version: 0.5.3 -> 0.5.4
- Update changelog
- Update man page
- Update config test
2019-12-25 07:46:54 -08:00