nushell/crates/nu-utils
Jordan Stewart 9a9fdd7a35
add examples for adding paths to PATH, and to load from a custom file in default_env.nu (#12032)
# Description
Show an example of loading from a custom file, and an example of adding
multiple entry to PATH. Loading from a custom file will hopefully allow
for greater modularity of configuration files out of the box for new
users. Adding multiple paths to PATH is very common, and will help new
users to.

Adds this:
```
# To add multiple paths to PATH this may be simpler:
# use std "path add"
# $env.PATH = ($env.PATH | split row (char esep))
# path add /some/path
# path add ($env.CARGO_HOME | path join "bin")
# path add ($env.HOME | path join ".local" "bin")
# $env.PATH = ($env.PATH | uniq)

# To load from a custom file you can use:
# source ($nu.default-config-dir | path join 'custom.nu')
```

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2024-03-02 11:14:42 -06:00
..
src add examples for adding paths to PATH, and to load from a custom file in default_env.nu (#12032) 2024-03-02 11:14:42 -06:00
.gitignore added nu-utils crate, fixed issue where externals turn off vt processing (#4857) 2022-03-16 17:21:06 -05:00
Cargo.toml bump to dev release of nushell 0.90.2 (#11793) 2024-02-07 16:26:03 -06:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00