Commit Graph

39 Commits

Author SHA1 Message Date
Casey Rodarmor
687007a723
Stabilize modules (#2250) 2024-07-14 21:22:03 +00:00
Casey Rodarmor
458805e283
Allow mod path to be directory containing module source (#2238) 2024-07-08 22:38:25 +00:00
Casey Rodarmor
d6669e0b97
Allow enabling unstable features with set unstable (#2237) 2024-07-08 03:45:03 +00:00
Casey Rodarmor
18ec9796b9
Improve argument parsing and error handling for submodules (#2154) 2024-06-14 02:41:45 +00:00
Casey Rodarmor
af249dbce1
Write shebang recipes to $XDG_RUNTIME_DIR (#2128) 2024-06-05 19:03:14 +00:00
Casey Rodarmor
f2201d8684
Add set dotenv-required to require an environment file (#2116) 2024-05-30 23:12:07 +00:00
Casey Rodarmor
9d2c6b8858
Allow listing submodule recipes with --list PATH (#2108) 2024-05-29 08:08:29 +00:00
Casey Rodarmor
d3492e6ffe
Use cache dir for temporary files (#2067)
Sometimes `/tmp` is mounted with the `noexec` option, which results
causes running shebang recipes to fail.

Instead of `/tmp`, use the cache directory as provided by the
[dirs crate](https://docs.rs/dirs/latest/src/dirs/lib.rs.html#77).
2024-05-21 00:04:42 +00:00
Casey Rodarmor
a9b0912b2b
Add --man subcommand (#2041) 2024-05-15 07:28:50 +00:00
Poliorcetics
caace0a115
Update clap to version 4 (#1924) 2024-05-14 20:29:40 -07:00
Elizaveta Demina
9aea3e679b
Add assert expression (#1845) 2024-05-15 01:55:32 +00:00
Casey Rodarmor
c237c0097b
Fix Error::TmpdirIo error message (#1987) 2024-04-01 08:11:43 +00:00
Casey Rodarmor
1ea5e6ac31
Don't conflate recipes with the same name in different modules (#1825) 2024-01-08 13:26:33 -08:00
Casey Rodarmor
e2c0d86bdd
Optional modules and imports (#1797) 2023-12-29 12:16:31 -08:00
Casey Rodarmor
f039701f71
Expand tilde in import and module paths (#1792) 2023-12-29 02:08:02 +00:00
Casey Rodarmor
316ea01295
Add modules (#1782) 2023-12-28 04:27:15 +00:00
Casey Rodarmor
e9bec8d398
Stabilize !include path as import 'path' (#1771) 2023-12-20 12:31:51 +08:00
Casey Rodarmor
ab16c0493f
Don't default to included recipes (#1740) 2023-11-22 18:27:49 +00:00
Greg Shuflin
f745316e88
Move !include processing into compiler (#1618) 2023-11-21 11:28:59 -08:00
Hwatwasthat
9415bee16b
Add [confirm] attribute (#1723) 2023-11-16 23:51:34 +00:00
Yuri Astrakhan
e01dbda156
Clean up error display (#1699) 2023-10-16 20:18:25 -07:00
Yuri Astrakhan
a1220c63e3
Cleanup (#1566) 2023-06-12 16:53:55 +00:00
Casey Rodarmor
a81b094441
Downgrade to TLS 1.2 in install script (#1536)
Revert "Update install script and readmes to use tls v1.3 (#1481)"

This reverts commit 9b6b0b7fac.
2023-01-27 02:49:03 +00:00
Greg Shuflin
912863bc1e
Add !include directives (#1470) 2023-01-13 03:25:28 +00:00
Cameron Steffen
216df31543
Eliminate lazy_static (#1442) 2022-12-15 16:53:21 -08:00
Mike Burns
8ef3148fa8
Use dotenvy instead of dotenv (#1443) 2022-12-15 04:32:27 +00:00
Casey Rodarmor
73777f7183
Add OS Configuration Attributes (#1387) 2022-10-31 00:52:03 -07:00
Gökhan Karabulut
8b7640b633
Add [no-exit-message] recipe annotation (#1354)
When a recipe wraps cli tool and the tool exits with a non-zero code,
just adds its own extra exit error message along with the messages
from the tool. Introduce the `[no-exit-message]` attribute to suppress
this additional message.
2022-10-25 16:32:36 -07:00
Casey Rodarmor
01fae9b1e4
Do use super::*; instead of use crate::common::*; (#1239) 2022-06-19 04:56:31 +00:00
Casey Rodarmor
0ae91884e2
Add --dump-format json (#992) 2021-11-17 00:07:48 -08:00
Hoàng Đức Hiếu
1cf8a714e2
fmt: check formatting with --check (#1001) 2021-11-01 04:27:59 +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
0db4589efe
Implement regular expression match conditionals (#970) 2021-09-16 23:45:56 +00:00
Casey Rodarmor
629c75ff04
Use stable rustfmt instead of nightly (#967) 2021-09-16 13:44:40 +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
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
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
aefdcea7d0
Gargantuan refactor (#522)
- Instead of changing the current directory with `env::set_current_dir`
  to be implicitly inherited by subprocesses, we now use
  `Command::current_dir` to set it explicitly. This feels much better,
  since we aren't dependent on the implicit state of the process's
  current directory.

- Subcommand execution is much improved.

- Added a ton of tests for config parsing, config execution, working
  dir, and search dir.

- Error messages are improved. Many more will be colored.

- The Config is now onwed, instead of borrowing from the arguments and
  the `clap::ArgMatches` object. This is a huge ergonomic improvement,
  especially in tests, and I don't think anyone will notice.

- `--edit` now uses `$VISUAL`, `$EDITOR`, or `vim`, in that order,
  matching git, which I think is what most people will expect.

- Added a cute `tmptree!{}` macro, for creating temporary directories
  populated with directories and files for tests.

- Admitted that grammer is LL(k) and I don't know what `k` is.
2019-11-09 21:43:20 -08:00