You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cookbook/setup.md
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,35 @@ There are other ways to view these values and variables, however setting up your
11
11
12
12
### Configure your path and other environment variables
13
13
14
-
In order to configure your path in nushell you'll need to modify your `PATH` environment variable in your `config.nu` file. Open your `config.nu` file and put an entry in it like `$env.PATH = "path1;path2;path3"` ensuring that you use the proper path separation character, which is different by platform.
14
+
In your `env.nu`, you can set up your environment.
15
15
16
-
Alternately, if you want to append a folder to your `PATH`environment variable you can do that too using the `append` or `prepend` command like this:
16
+
To configure environment variables, you use the `$env` variable:
For more detailed instructions, see the documentation about [environment variables](/book/environment.html#setting-environment-variables) and [PATH configuration](/book/configuration.html#path-configuration).
23
+
To add paths to the `PATH` environment variable, you can append them:
24
+
25
+
```nu
26
+
$env.PATH ++= ['~/.local/bin']
27
+
```
28
+
29
+
Because you can append a list of paths, you can append multiple at once. You can also use subcommands to construct the paths in line.
Because PATH order makes a difference, you may want to *prepend* your paths instead, so that they take precedence over other executables with the same name:
36
+
37
+
```
38
+
use std/util "path add"
39
+
path add '~/.local/bin'
40
+
```
41
+
42
+
For more information, see the documentation about [environment variables](/book/environment.html#setting-environment-variables) and [PATH configuration](/book/configuration.html#path-configuration).
0 commit comments