Skip to content

Releases: rust-shell-script/rust_cmd_lib

v1.0.10

27 Mar 22:57
Compare
Choose a tag to compare

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

24 Mar 02:23
Compare
Choose a tag to compare

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

23 Mar 16:29
Compare
Choose a tag to compare

Changes

  • Refactored lexer code, to do forward scanning if possible
  • Fixed run_fun! bug to make sure redirection always work
  • Added cmd_info!() macro to print messages conveniently
  • Make unit tests cases more robust

v0.12.5

22 Mar 05:17
Compare
Choose a tag to compare

Changes

  • fixed command redirections, support &>> format and fail a bunch of invalid formats

v0.12.4

22 Mar 01:55
Compare
Choose a tag to compare

Changes

  • Better debugging support
  • Show more details about running commands

v0.12.3

21 Mar 20:05
Compare
Choose a tag to compare

Changes

  • Fixed cd bugs to make sure later commands always use the previous settings in the same command group
  • Update dd_test example to use structopt and rayon 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

10 Mar 01:37
Compare
Choose a tag to compare

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

Tests and Examples

Misc

  • A bunch of code clean up, including eliminating duplicated code and unnecessary APIs