Skip to content

Commit

Permalink
docs: mention watch_file in direnv usage (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Mar 14, 2024
1 parent cf548aa commit 15a53d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ This allows you to use `pixi` in combination with `direnv`.
Enter the following into your `.envrc` file:

```shell title=".envrc"
eval "$(pixi shell-hook)" # (1)!
watch_file pixi.lock # (1)!
eval "$(pixi shell-hook)" # (2)!
```

1. This installs if needed, and activates the environment. `direnv` ensures that the environment is deactivated when you leave the directory.
1. This ensures that every time your `pixi.lock` changes, `direnv` invokes the shell-hook again.
2. This installs if needed, and activates the environment. `direnv` ensures that the environment is deactivated when you leave the directory.

```shell
$ cd my-project
Expand Down

0 comments on commit 15a53d1

Please sign in to comment.