Skip to content

Commit

Permalink
Merge pull request direnv#1191 from Jasha10/Jasha10-patch-1
Browse files Browse the repository at this point in the history
direnv.toml.1.md: add examples for $HOME expansion
  • Loading branch information
Mic92 authored Dec 5, 2023
2 parents e517d3a + f7e4f66 commit df6f060
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions man/direnv.toml.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,20 @@ Example:

```toml
[whitelist]
prefix = [ "/home/user/code/project-a" ]
prefix = [ "/home/user/code/project-a", "~/code/project-b" ]
```

In this example, the following .envrc files will be implicitly allowed:

* `/home/user/code/project-a/.envrc`
* `/home/user/code/project-a/subdir/.envrc`
* `~/code/project-b/.envrc`
* `~/code/project-b/subdir/.envrc`
* and so on

In this example, the following .envrc files will not be implicitly allowed (although they can be explicitly allowed by running `direnv allow`):

* `/home/user/project-b/.envrc`
* `/home/user/project-c/.envrc`
* `/opt/random/.envrc`

### `exact`
Expand All @@ -96,18 +98,18 @@ Example:

```toml
[whitelist]
exact = [ "/home/user/project-b/.envrc", "/home/user/project-b/subdir-a" ]
exact = [ "/home/user/project-a/.envrc", "~/project-b/subdir-a" ]
```

In this example, the following .envrc files will be implicitly allowed, and no others:

* `/home/user/code/project-b/.envrc`
* `/home/user/code/project-b/subdir-a`
* `/home/user/code/project-a/.envrc`
* `~/project-b/subdir-a`

In this example, the following .envrc files will not be implicitly allowed (although they can be explicitly allowed by running `direnv allow`):

* `/home/user/code/project-b/subproject-c/.envrc`
* `/home/user/code/.envrc`
* `~/code/.envrc`

COPYRIGHT
---------
Expand Down

0 comments on commit df6f060

Please sign in to comment.