Skip to content

Commit

Permalink
fix cli docs
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Mar 30, 2022
1 parent fbd0049 commit 93ee394
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
*watchfiles* also comes with a CLI for running and reloading python code, the CLI uses
*watchfiles* comes with a CLI for running and reloading code, the CLI uses
[watchfiles.run_process][watchfiles.run_process] to run the code and like `run_process` can either run a python
function or a shell-like command.

The CLI can also be used either via `watchfiles ...` or `python -m watchfiles ...`.
The CLI can be used either via `watchfiles ...` or `python -m watchfiles ...`.

## Running and restarting a python function

Let's say you have `foobar.py` (this is a very simple web server using
Let's say you have `foobar.py` (in this case a very simple web server using
[aiohttp](https://aiohttp.readthedocs.io/en/stable/)) which gets details about recent file changes from the
`WATCHFILES_CHANGES` see [`run_process` docs](./api/run_process.md#watchfiles.run_process)
environment variable and returns them as JSON.
`WATCHFILES_CHANGES` environment variable (see [`run_process` docs](./api/run_process.md#watchfiles.run_process))
and returns them as JSON.

```py
title="foobar.py"
Expand Down Expand Up @@ -37,7 +37,7 @@ watchfiles foobar.main

## Running and restarting a command

Let's say you want to re-run failing tests whenever python files change. You could do this with watchfiles using
Let's say you want to re-run failing tests whenever files change. You could do this with **watchfiles** using

```bash title="Running a command"
watchfiles 'pytest --lf'
Expand Down

0 comments on commit 93ee394

Please sign in to comment.