A major release with significant changes to the API:
- Interior mutability and references are removed. Both
Cmd
andShell
are now values. pushd
-style API are removed in favor ofShell
-returning functional builders likewith_current_dir
.- Split
copy_file
intocopy_file
andcopy_file_to_dir
, removing auto-magical directory detection. - Remove fine-grained control of stdin streams from
Cmd
. Instead:- There's a menu of
run
,run_echo
,run_interactive
,read
that generally try to do the right thing. run
no longer echoes the command by default,run_echo
does that.- The error messages now carry last 128KiB of stdout/stderr and print them on error.
- There's
to_command
method for converting tostd::process::Command
which does allow for fine grained control.
- There's a menu of
- Support for timeouts.
- MSRV is raised to 1.73.0.
- MSRV is raised to 1.63.0
- Avoid using non-existant cfg in macros
- Implement
Clone
forShell
.
- Improve error message when a working directory for
cmd!
does not exist.
- Fix bug where
Cmd::run
would ignore specified stdin.
- Add
Shell::path_exists
.
Shell::remove_path
returnsOk
if the path does not exist (ie the function is now idempotent).
A major release with significant changes to the API:
- All global state is removed in favor of explicitly passing a
Shell
instance. - Some methods are renamed to better match Rust naming conventions.
- New APIs for controlling working directory and environment.
- MSRV is raised to 1.59.0.
- Improved reliability across the board: the crate aims to become a dependable 1.0 tool in the future (no ETA).
- This is expected to be the last large API reshuffle.
- Allow panics to transparently pass through xshell calls. This removes some internal lock poisoned errors.
- Add
xshell::hard_link
.
- Correctly handle multiple internal read guards.
- Correctly handle commands name starting with quote.
- Add
ignore_stdout
,ignore_stderr
functions.
- Add
env
,env_revome
,env_clear
functions.
write_file
now creates the intervening directory path if it doesn't exit.
echo_cmd
output goes to stderr, not stdout.
mktemp_d
creates an (insecure, world readable) temporary directory.- Fix cp docs.
- Add option to not echo command at all.
- Add option to censor command contents when echoing.
- Add docs.
cp(foo, bar)
copiesfoo
intobar
, ifbar
is an existing directory.- Tweak reading API.
.read()
chomps\r\n
on Windows.- Prevent cwd/env races when using
.read()
or.run()
. - Better spans in error messages.
- Improve proc-macro error messages.
- No changelog until this point :(