mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 06:48:17 +02:00
Add user autoload directory (#14669)
# Description Adds a user-level (non-vendor) autoload directory: ``` ($nu.default-config-dir)/autoload ``` Currently this is the only directory. We can consider adding others if needed. Related: As a separate PR, I'm going to try to restore the ability to set `$env.NU_AUTOLOAD_DIRS` during startup. # User-Facing Changes Files in `$nu.default-config-dir/autoload` will be autoload at startup. These files will be loaded after any vendor autoloads, so that a user can override the vendor settings. # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting TODO; add a `$nu.user-autoload-dirs` constant. Doc updates
This commit is contained in:
@ -1357,7 +1357,7 @@ fn variables_completions() {
|
||||
// Test completions for $nu
|
||||
let suggestions = completer.complete("$nu.", 4);
|
||||
|
||||
assert_eq!(18, suggestions.len());
|
||||
assert_eq!(19, suggestions.len());
|
||||
|
||||
let expected: Vec<String> = vec![
|
||||
"cache-dir".into(),
|
||||
@ -1377,6 +1377,7 @@ fn variables_completions() {
|
||||
"plugin-path".into(),
|
||||
"startup-time".into(),
|
||||
"temp-path".into(),
|
||||
"user-autoload-dirs".into(),
|
||||
"vendor-autoload-dirs".into(),
|
||||
];
|
||||
|
||||
|
Reference in New Issue
Block a user