Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 authored Dec 20, 2024
1 parent 76362bf commit 7ada6e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1927,8 +1927,14 @@ details.
- `home_directory()` - The user's home directory.

If you would like to use XDG base directories on all platforms you can use the
`env(…)` function with the appropriate environment variable, e.g.,
`env('XDG_CACHE_HOME')`.
`env(…)` function with the appropriate environment variable and fallback, e.g.
```just
xdg_config_dir := if env('XDG_CONFIG_HOME', '') =~ '^/' {
env('XDG_CONFIG_HOME')
} else {
home_directory() / '.config'
}
```

### Constants

Expand Down

0 comments on commit 7ada6e7

Please sign in to comment.