Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kurtbuilds/watchexec-simple
https://github.com/kurtbuilds/watchexec-simple
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kurtbuilds/watchexec-simple
- Owner: kurtbuilds
- License: mit
- Created: 2022-01-27T04:42:53.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-24T17:39:34.000Z (about 1 year ago)
- Last Synced: 2023-10-24T18:36:52.161Z (about 1 year ago)
- Language: Rust
- Size: 60.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Usage
`watchexec-simple` is a simpler alternative for the existing `watchexec` project. It doesn't implement nearly
all the features that the full `watchexec` project provides. However, it provides the core functionality in a codebase
that is much smaller (at last count, 5%). It is built on the same `notify` library, itself built by the same authors as `watchexec`.
`watchexec-simple` installs to the same binary name as the `watchexec` project.Here is a simple example of using `watchexec-simple`:
watchexec -- cargo run
### Comparison to `watchexec`
When possible, `watchexec-simple` relies on the same option names as `watchexec`. The key differences are:
1. For `watchexec-simple`, positional arguments are watched paths, and `--` is required and used to separate the command. For `watchexec`, positional
arguments are the command, and each path requires a `-w` to be passed in. For example:
```bash
# watchexec-simple
watchexec src/ data/ .env -- cargo run# watchexec
watchexec -w src/ -w data/ -w .env cargo run
```2. By default, `watchexec-simple` restarts the process, even if it is actively running. For `watchexec`, the user is required to pass the `-r` option. Example:
```bash
# watchexec-simple
watchexec -- cargo run# watchexec
watchexec -r cargo run
```3. `watchexec-simple` does not run the command in a shell. If you want a shell,
use something like: `watchexec -- /bin/bash -c 'command'`. By default,
`watchexec` runs all commands in a shell.# Installation
cargo install watchexec-simple