-
Notifications
You must be signed in to change notification settings - Fork 540
Description
Reading the following lines:
nushell.github.io/book/configuration.md
Lines 393 to 395 in 787a5a1
| - `$env.XDG_DATA_HOME`: If this environment variable is set, Nushell sets the `$nu.data-dir` constant to this value. The `data-dir` is used in several startup tasks: | |
| - `($nu.data-dir)/completions` is added to the `$env.NU_LIB_DIRS` search path. |
My initial understanding of this passage was that if $env.XDG_DATA_HOME is and ($nu.data-dir)/completions exists, then it gets added to $env.NU_LIB_DIRS automatically on nushell startup. However, looking around at what people report from their own configs, it appears that $env.NU_LIB_DIRS has to be built up somewhat manually. Indeed, in my own case, XDG_DATA_HOME is set and the completions dir exists, but if I don't manually build $env.NU_LIB_DIRS, then it's just empty.
Have I misunderstood something here? Happy to contribute a PR with a doc update to clarify, if someone is willing to help me understand what the correct behaviour is.