From a6b0db5ede8c02283d018231d2a2f0ccc2916198 Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Mon, 23 Dec 2024 01:04:32 -0500 Subject: [PATCH] Update readme to use `env()` instead of `env_var*()` (#2546) --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a8c1559817..3874b7105f 100644 --- a/README.md +++ b/README.md @@ -1645,7 +1645,7 @@ olleh := shell('import sys; print(sys.argv[2][::-1])', 'hello') #### Environment Variables -- `env(key)` — Retrieves the environment variable with name `key`, aborting +- `env(key)`1.15.0 — Retrieves the environment variable with name `key`, aborting if it is not present. ```just @@ -1660,10 +1660,10 @@ $ just /home/user1 ``` -- `env_var_or_default(key, default)` — Retrieves the environment variable with +- `env(key, default)`1.15.0 — Retrieves the environment variable with name `key`, returning `default` if it is not present. -- `env(key)`1.15.0 — Alias for `env_var(key)`. -- `env(key, default)`1.15.0 — Alias for `env_var_or_default(key, default)`. +- `env_var(key)` — Deprecated alias for `env(key)`. +- `env_var_or_default(key, default)` — Deprecated alias for `env(key, default)`. A default can be substituted for an empty environment variable value with the `||` operator, currently unstable: @@ -2446,8 +2446,8 @@ HOME is '/home/myuser' #### Setting `just` Variables from Environment Variables -Environment variables can be propagated to `just` variables using the functions -`env_var()` and `env_var_or_default()`. See +Environment variables can be propagated to `just` variables using the `env()` function. +See [environment-variables](#environment-variables). ### Recipe Parameters