Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Mention watch_file in direnv usage #983

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading