# direnv: Allow disabling env integration entirely \(\#43764\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/db86febc0cfa2516b516e4fac03e4bb94cabdb62)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: db86febc0cfa2516b516e4fac03e4bb94cabdb62

Requested commit: db86febc0cfa2516b516e4fac03e4bb94cabdb62

Commit: db86febc0cfa2516b516e4fac03e4bb94cabdb62

Tree: 2879c496484d0da5a8704f56f31530b2282bc711

Author: Ian Chamberlain

Committer: GitHub

## Message

```
direnv: Allow disabling env integration entirely (#43764)

Relates to #35759, but maybe doesn't entirely fix it? I think it will
improve the situation, at least.
Also provides a workaround for the issue described in
https://github.com/zed-industries/zed/issues/40094#issuecomment-3559808526
for users of WSL + `nix-direnv`.

Rationale: there are cases where automatic direnv integration is not
always desirable, but Zed currently has no way of opting out of this
integration besides `direnv revoke` (which is often not desirable).

This PR provides such an opt-out for users who run into problems with
the existing direnv integration methods. Some reasons why disabling
might be useful:
- Security concerns about auto-loading `.envrc` (arguably, `direnv
revoke` should cover this most of the time)
- As in #35759, for users who use different shells/envs for
interactive/non-interactive cases and want to manually control the
environment Zed uses
- As in #40094, to workaround OS limits on environment variable /
command-line parameter size


Release Notes:

- Added the ability to disable direnv integration entirely
```

## Parents

- [d1d419b209253cb08ccf9175395d3dc5c820e140](https://git.cafe/gitcafe/zed/commit/d1d419b209253cb08ccf9175395d3dc5c820e140?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/db86febc0cfa2516b516e4fac03e4bb94cabdb62?format=markdown)
