Skip to content

95jonpet/cmdrec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

cmdrec

Record and retrieve command results.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License

About The Project

cmdrec is a command line tool for recording, and later reusing, command results.

(back to top)

Built With

  • Rust

(back to top)

Getting Started

cmdrec can be installed locally using cargo.

  1. Clone the repo.

    git clone https://github.com/95jonpet/cmdrec.git
  2. Compile and run the code.

    cargo install --path .

(back to top)

Usage

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

(back to top)

Contributing

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!

  1. Fork the Project.
  2. Create your Feature Branch (git checkout -b feature/amazing-feature).
  3. Commit your Changes (git commit -m 'Add amazing feature').
  4. Push to the Branch (git push origin feature/amazing-feature).
  5. Open a Pull Request.

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)