All notable changes to this project are documented here. The format is loosely based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Bump Rust edition to 2024; minimum supported Rust version raised accordingly.
- Replace
lazy_static!withstd::sync::LazyLock(standard-library only). - Use new
proc_macrospan APIs to get the next token with no gap. - New
build-printfeature: enablebuild.rslogging. - Add non-global ways to set debug and pipefail modes (thread-local overrides).
- Fix thread unsafety caused by internal
set_var()use; work aroundset_pipefail()thread-safety bug. - Replace
wait_with_pipe()withwait_with_borrowed_pipe(); fix hang when called with built-ins. - Fix handling of
ignoreinwait()andwait_with_all(). - Inherit tracing spans when the program uses
tracing. - Make stderr logging handle CR-separated progress output.
- Support command environment variable values that contain
=. - Include license text in the packaged macros crate.
- Large refactor and new
test_ignore_and_pipefail()test suite covering most entry points.
- Support more formats for interpolation strings.
- Support
${variable:?}in interpolation strings. - Examples: port from
structopttoclap/derive.
- Fix
pipefailissue for therun_fun!()macro. - Report full commands in errors to give more context.
- Switch from
proc-macro-errortoproc-macro-error2. - Consolidate pipe-related test cases.
- Skip empty arguments.
- Remove
MainResultandMainError.
- Update
FunChildrenAPIs.
- Append command location information into errors.
- Update custom-command API signature.
- Hide
CmdIn/CmdOutimplementation details. - Fix unit testing of macros.
- Refactor custom-command registration.
- New API to catch all output and return code.
- Documentation updates.
- Add
cmd_lib::mainattribute macro to logmain()errors by default. - Support empty commands and empty commands in pipelines.
- Support
-noption for the builtinechocommand.
- Refactor logging mechanism for better readability.
- Cleaner printing of
ignore,cd, and redirect operations.
- Better error reporting when running commands.
- Use
env_loggeras the default logger. - Allow nested
cdcommands inside group commands. - Support iterators that produce
OsStr. - Use arrays (instead of vectors) for command arguments.
- Add API to get PIDs of pipeline processes; support killing a pipeline.
- Improved error reporting when spawning processes fails.
- Import
main_errorcrate for nicer top-level error reporting.
- Allow
ignoreto be used for builtin commands; allow ignoring spawn errors. - New flag to control command error reporting; broader error-reporting refactor.
- Move stderr polling into a separate structure.
- Low-level API cleanup.
- Allow
ignoreto ignore all errors inside pipelines.
- Fix issue #36; cleanup around log waiting.
- Fix
ignorebehavior for builtin commands. - Always report thread-join errors.
- Warn-level messages only emitted when debug flag is enabled.
- Fix builtin-command redirection bug.
- Launch a separate thread to print stderr log (fix #35).
- Read stdout/stderr buffers before and after
wait. - Fix pipe-full issue for builtin commands.
- Check thread-join return values.
- Add builtin
ignorecommand. run_cmd!()andspawn!()no longer capture output.- Remove support for the
||command operator. - Update
wait_with_pipe()API. - Fix pipe race condition in tests.
- Allow
Path/OsStringvariables to be used directly in commands. - Convert variables to
OsStringviainto_os_string(); replaceIntoOsStringtrait withAsOsStr. - Print
OsStringvalues withoutunwrap(). - Fix
dd_testdisplay regression.
- Support stream API with
wait_with_pipe(). - Process cleanup: simplify wait structure; move
CmdChildrentochild.rs. - Rename
wait_cmd/wait_funfunctions; removeChildpostfix from APIs. - Print messages so that
cargo testis happy.
- Update
cmd_die!()macro to return the!(never) type. - Use iterators for parser; embed iterator into
Lexerstruct. - Return size 0 for
/dev/nullreads. - Fix stderr logging (#23).
- Large internal cleanup of lexer, parser, child, and process modules.
- Optimize handling of
/dev/null. - Reject the same redirection being set multiple times.
- Spawn a separate thread for builtin/custom pipe-out threads, and check its status.
- Fix stderr piping bug.
- Fix macOS testing error.
- Continued work on the
logcrate dependency.
- Add
logcrate dependency forcmd_lib_macros.
- Support
|&operation; tighter checks around&formats. - Optimize for
/dev/null; fix redirection-all-to-a-file. - Simplify debug strings.
- Log builtin/custom command's stderr content.
- Fix builtin command stderr redirection.
- Report
cdcommand errors.
- Ensure command-running errors are logged across all code paths.
- Suppress errors when
or_cmdcan run. - Log errors for
wait_raw_result().
- Add
cmd_echo!support and print all log levels by default. - Default logging level set to debug.
- Capture all stderr messages into logs.
- Add log levels for
warn!()anderror!(). - Log error messages when running commands fails.
- Add logging support.
- Fix empty command with variable settings.
- Only take child's stdin for previous builtin/custom commands.
- Lexer cleanup.
- First stable release.
- Update builtin/custom command registration API.
- Remove
vars()API fromCmdEnv.
- Refactor
processmodule; tidierstd_cmdmatching.
- Move command vector into the lower-level
Cmdstruct; carry more information onCmditself. - Update
CmdStdioAPIs. - Fix
wait_raw_result()wait bug. - Simplify
current_dirsetting and debug-string printing.
- Don't panic when opening files fails; always wait for children even on failure.
- Parser cleanup.
- Support null command.
- Refactor
RedirectFdstruct and redirection parsing. - Apply Rust 1.51 clippy suggestions.
- Update crate keywords.
- Support pipe in / stdin for builtin and custom commands.
- Lexer cleanup.
- Release global
CMD_MAPlock during execution. - Fix redirection-format check; lexer refactor.
- Update
ProcHandleenum. - Fix string-literal parsing.
- Cleanup of builtin-command implementation.
- Replace
die!()macro withcmd_die!(). - Update builtin-command API interface.
- Support basic stdout/stderr redirection for builtin commands.
- Update docs on registering custom commands.
- Add
cmd_info!()macro. - Allow more valid tokens after pipe; check more invalid redirection formats.
- Fix raw fd redirection issues.
- Fix redirection bug for
run_fun!. - Lexer refactor.
- Fix redirect bug; fail more invalid redirections.
- Show envs and redirects when running in debug mode.
- Clean up
current_dirsetting. - Move children out of
Cmdsstruct.
- Simplify argument parsing in examples (
clap/structopt). - Re-revert "Removed lazy_static package dependency".
- Fix
current_dirsetting issues.
- Better error messages for macro compilation; use
proc_macro_errorcrate. - Add support for escaped characters.
- Parse variables in a single pass; cleaner peekable iterator.
- CI: introduce
rust.ymlworkflow.
- Add
spawn_with_output!()macro. - Refactor to allow builtin commands in pipes.
- Rename
proc_var*totls_*. - Add
set_pipefail()API; replacetry_wait()withwait(). - Drop
tempfiledependency. - Many examples/test fixes (tetris, pipes, pipefail on macOS).
- Release candidate for 0.12.0.
- Update logging macro/functions.
- Make
pipefailthe default. - Add
die!macro andinfo()builtin. - More logging-related builtin commands; more examples.
- Drop
lazy_staticpackage dependency.
- Add
spawnmacro with compile-time check.
- Hide builtin functions from public API.
- Rename
use_cmdtouse_custom_cmd. - Support builtin commands.
- Macro library cleanup; doc typo fix.
- Move parser from runtime into compile time (proc-macro parsing).
- Refactor
processimplementation.
- Fix cargo-readme code-highlighting issue.
- Fix doctest failure.
- Documentation updates; tokenstream cleanup.
- New compile-time pipeline implementation: pipes, string literals,
semicolons, variable passing,
Orcommand, vector variables, environment variable passing, stdin/stdout/stderr/fd redirection. - Introduce new lexer with
SepTokenandMarkerToken. - Unify
run_cmdandrun_funmacros.
- Add variable-substitution rules.
- Add
config_cmd/export_cmd/use_cmdAPIs;set_debugAPI. - Hide internal APIs.
- Better error reporting for proc-macros.
- Skip invalid variable names.
- Clean up
Cargo.tomlforproc-macro2.
- First release published to crates.io.