Commit Graph

312 Commits

Author SHA1 Message Date
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
Casey Rodarmor
61ab53dbc1
Add justfile_directory() and justfile() (#569)
Add `justfile()` function, returning the current justfile, and
`justfile_directory(), returning its parent directory.
2019-12-25 06:12:06 -08:00
Casey Rodarmor
fe906a1b6f
Fix regression in error message color printing (#566)
Make the word "error" print in red instead of plain text.
2019-12-12 17:55:55 -08:00
Casey Rodarmor
bb4afe1481
Reform indentation handling (#565)
Improve indentation handling in preparation for implementing inline
submodules. This changes the lexer to only parse freeform text inside
the first indent after a ':', so that just can be extended with new
indented constructs which are not recipe bodies. In addition, the lexer
should now handle multiple levels of indentation correctly.
2019-12-11 20:25:16 -08:00
Casey Rodarmor
320e2027a1
Release v0.5.3 (#563)
- Bump version: v0.5.2 -> v0.5.3
- Update changelog
2019-12-11 17:22:46 -08:00
Casey Rodarmor
49cd7f5a93
Improve pre-publish check (#562)
- Ensure man page is up to date
- Build with summary feature
2019-12-11 17:08:48 -08:00
Casey Rodarmor
9eb867dd15
Fix typo: chracter -> character (#561) 2019-12-10 15:10:22 -08:00
Casey Rodarmor
b5dea44ee7
Assert that lexer advances over entire input (#560) 2019-12-10 13:24:30 -08:00
Casey Rodarmor
20790a0cc7
Release v0.5.2 (#557)
- Bump version: v0.5.1 -> v0.5.2
- Update changelog
- Update dependencies
2019-12-07 04:59:58 -08:00
Casey Rodarmor
0931fa8dbf
Allow passing arguments to dependencies (#555)
Allow recipes that take parameters to be used as dependencies.
2019-12-07 04:03:03 -08:00
Casey Rodarmor
2d3134a91c
Reform scope and binding (#556)
Clean up scope handling by introducing `Binding` and `Scope` objects.
2019-12-07 03:09:21 -08:00
Casey Rodarmor
d0e813cd8b
Add flags to set and clear shell arguments (#551)
Add the `--shell-arg` and `--clear-shell-args` flags, which allow
setting and clearing arguments to the shell from the command line.

This allows full control over the shell from the command line. Additionally,
any shell-related arguments on the command line override
 `set shell := [...]` in the Justfile, which I think will be the behavior that most
people expect.
2019-11-22 13:33:56 -06:00
Casey Rodarmor
d2decbfdb8
Resolve functions (#550)
Modifies parsing to return strongly-typed `Thunk`s, which contain both
the function implementation, as well as the correct number of arguments.

This moves unknown function and function argument count mismatch errors
to parse time.
2019-11-21 12:14:10 -06:00
Casey Rodarmor
ba93c5e6af
Remove unnecessary type argument to Alias (#549) 2019-11-21 10:14:55 -06:00
Casey Rodarmor
4f08bb4d77
Resolve alias targets (#548)
During analysis, resolve alias targets from `Name`s to `Rc<Recipe>`,
giving us type-level assurance that alias resolution was performed, and
avoiding the need to look up alias targets in a separate table when
running.
2019-11-21 09:39:32 -06:00
Casey Rodarmor
30c77f8d03
Resolve recipe dependencies (#547)
Make analysis resolve recipe dependencies from names (`Name`) to recipes
(`Rc<Recipe>`), to give type-level certainty that resolution was performed
correctly and remove the need to look up dependencies on run.
2019-11-21 08:23:32 -06:00
Casey Rodarmor
72bc85e4ea
Un-implement Deref for Table (#546)
Remove `Deref` implementation for `Table`, to make sure we're using
`Table` and not `BTreeMap`.
2019-11-20 16:19:49 -06:00
Casey Rodarmor
e5232fda89
Release v0.5.1 (#544)
- Bump version: v0.5.0 -> v0.5.1
- Update changelog
2019-11-20 02:08:58 -06:00
Casey Rodarmor
e948f11784
Add --init subcommand (#541)
When `--init` is passed on the command line, search upward for the
project root, identified by the presence of a VCS directory like `.git`,
falling back to the current directory, and create a default justfile in
that directory.
2019-11-20 01:07:44 -06:00
Casey Rodarmor
c4e9857ebd
Avoid fs::canonicalize (#539)
Previously, we used `fs::canonicalize` to ensure paths used in search
were absolute. This lead to bad behavior when the justfile was symbolic
link to a file in another directory. Additionally, on Windows, this
produced paths in extended length syntax, which, I believe, has
compatibility issues.

This diff replaces uses of `fs::canonicalize`  with a simpler algorithm
that roots path in the invocation directory (which will be a no-op if
said path is already absolute), uses `Path::components` to remove extra
`/` and `.`, and resolves instances of `..` without following symlinks, by
removing the `..` and the component that proceeds it.
2019-11-19 03:51:44 -08:00
Casey Rodarmor
f8693d6fe0
Move lexer comment (#536) 2019-11-13 19:53:14 -08:00