[![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![MIT License][license-shield]][license-url]
Logo

async_run

Asynchronously execute shell commands in filtered subdirectories.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments
## About The Project [![Product Name Screen Shot][product-screenshot]](https://github.com/kingwingfly/asyncrun) Do things like `find . -type d -name ".git" | xargs -I _ -P 64 sh -c "cd _/.. && git pull --rebase &> /dev/tty"` easier if you're not a unix-pro guy. Instead, just `asyncrun -e .git -- "git pull --rebase"`.

(back to top)

### Built With * [![Rust][Rust]][Rust-url]

(back to top)

## Getting Started Download at [release](https://github.com/kingwingfly/asyncrun/releases) page. Or ```sh cargo install asyncrun ``` Or compile yourself: ### Prerequisites * Install Rust ```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` ### Compilation 1. Clone the repo ```sh git clone https://github.com/kingwingfly/asyncrun.git ``` 2. Compilation ```sh cargo build --release ```

(back to top)

## Usage ```sh Asynchronously execute shell commands in filtered subdirectories Usage: asyncrun [OPTIONS] [PATH] -- ... Arguments: [PATH] Path to search for directories [default: /Users/louis/rust/asyncrun] ... Commands to run in each directory Options: -e Filter by file/dir names all exist -E Filter by file/dir names all non-exist -n Number of async commands to run concurrently [default: 1024] -h, --help Print help -V, --version Print version ``` ### Example ```sh asyncrun -e .git -- "git fetch -p" "git pull --rebase" "git gc" asyncrun -e .git -e Cargo.toml -- "cargo update" "git add ." "git commit -m 'update deps'" "git push" asyncrun -e Cargo.toml -e target -- "cargo clean" asyncrun -e .git -e .DS_Store -e .gitignore -- "git pull --rebase" "rm .DS_Store" "git add ." "git commit -m 'rm .DS_Store'" "grep -qxF '.DS_Store' .gitignore || echo '.DS_Store' >> .gitignore" "git add ." "git commit -m 'modified .gitignore'" "git push" | tee output.txt ```

(back to top)

## Roadmap - [ ] Feature See the [open issues](https://github.com/kingwingfly/asyncrun/issues) for a full list of proposed features (and known issues).

(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/AmazingFeature`) 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 4. Push to the Branch (`git push origin feature/AmazingFeature`) 5. Open a Pull Request

(back to top)

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

(back to top)

## Contact Louis - 836250617@qq.com Project Link: [https://github.com/kingwingfly/asyncrun](https://github.com/kingwingfly/asyncrun)

(back to top)

## Acknowledgments * []()

(back to top)

[contributors-shield]: https://img.shields.io/github/contributors/kingwingfly/asyncrun.svg?style=for-the-badge [contributors-url]: https://github.com/kingwingfly/asyncrun/graphs/contributors [forks-shield]: https://img.shields.io/github/forks/kingwingfly/asyncrun.svg?style=for-the-badge [forks-url]: https://github.com/kingwingfly/asyncrun/network/members [stars-shield]: https://img.shields.io/github/stars/kingwingfly/asyncrun.svg?style=for-the-badge [stars-url]: https://github.com/kingwingfly/asyncrun/stargazers [issues-shield]: https://img.shields.io/github/issues/kingwingfly/asyncrun.svg?style=for-the-badge [issues-url]: https://github.com/kingwingfly/asyncrun/issues [license-shield]: https://img.shields.io/github/license/kingwingfly/asyncrun.svg?style=for-the-badge [license-url]: https://github.com/kingwingfly/asyncrun/blob/master/LICENSE.txt [product-screenshot]: images/screenshot.png [Rust]: https://img.shields.io/badge/Rust-000000?style=for-the-badge&logo=Rust&logoColor=orange [Rust-url]: https://www.rust-lang.org