Releases: rust-shell-script/rust_cmd_lib
Releases · rust-shell-script/rust_cmd_lib
v1.0.10
Major Changes
- update CmdStdio APIs, use stdin(), stdout(), stderr() to get Reader/Writer for builtin/custom commands
- process internal: move most of the runtime information from Cmds to Cmd.
- freeze APIs and update docs for 1.0 release
- enable logging support
- log error messages when running command fails
- capture all messages on stderr into logs
- fix builtin command stderr redirection
- report cd command error
- try to capture all stdout/stderr messages if they are redirected to file
- support "|&"
- removed "log" crate dependency for end users
- add checks for multiple redirections for the same input/output #21
- spawn a separate thread for builtin/custom pipe-out threads to solve the pipe-full issue #22
v0.14.6
Major changes
- Use cmd_die!() to replace die!() macro, which is more consistent for string interpolation within this library
- Add cmd_info!() macro to print messages conveniently
- Add basic redirection support for builtin/custom commands
- Update command registration API
- Change buf from String to Vec in CmdStdio struct
- Fix parsing escape characters
- Refactor lexer code to move iteration related information into a separate TokenStreamPeekable struct
- Support io input for builtin/custom commands, and add builtin
cat
as an example - Support null command, like:
run_cmd!(>/tmp/output)
- Print number literals without converting to actual value:
run_cmd!(echo 0xff)
will print "0xff" instead of "255". - Make sure the children processes always being waited, even when the last command fails
- Don't panic process when there is any IO errors
v0.12.6
v0.12.5
v0.12.4
v0.12.3
Changes
- Fixed
cd
bugs to make sure later commands always use the previous settings in the same command group - Update
dd_test
example to usestructopt
andrayon
crates to simply the code - Clean up ownership in process APIs, and try not to take any ownership
- Change CMD_MAP back to lazy_static! to make sure it works in multi-thread environment
- Add github ci workflow
v0.12.0
Major Changes
- No more runtime lexing and arguments parsing, do lexing and parsing completely at compile time
- No more runtime package dependency except
std
- No more unsafe function calls
- Removed APIs which could lead to exploitable code
API Changes
- Add spawn! and spawn_with_output macros, to allow running
wait_result
to get result later - Renamed
proc_var/proc_var_get/proc_var_set
macros to tls_init/tls_get/tls_set macros - Allow builtin commands and custom defined commands to be used in pipes
- Allow
$[]
to be used for vector variables - Add cmd_lib::set_debug() and cmd_lib::set_pipefail() APIs to control debugging and pipefail behavior
Tests and Examples
Misc
- A bunch of code clean up, including eliminating duplicated code and unnecessary APIs