Record and retrieve command results.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
cmdrec
is a command line tool for recording, and later reusing, command results.
cmdrec
can be installed locally using cargo.
-
Clone the repo.
git clone https://github.com/95jonpet/cmdrec.git
-
Compile and run the code.
cargo install --path .
The following example illustrates typical usage of cmdrec
:
# Record test results.
record="$(cmdrec record -- cargo test)"
# Print errors if the `cargo test` command fails.
if [[ "$(cmdrec status "${record}")" -ne 0 ]]; then
echo "ERROR: Tests failed!" >&2
cmdrec stderr "${record}"
exit 1
fi
# Append the test output to a file.
cmdrec stdout "${record}" >> full-output.log
For a complete list of options, refer to the built-in help:
cmdrec --help
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/amazing-feature
). - Commit your Changes (
git commit -m 'Add amazing feature'
). - Push to the Branch (
git push origin feature/amazing-feature
). - Open a Pull Request.
Distributed under the MIT License. See LICENSE.txt
for more information.