mirror of
https://github.com/nushell/nushell.git
synced 2025-04-02 20:27:11 +02:00
Add current exe directory to default $NU_PLUGIN_DIRS
(#15380)
Quality-of-life improvement - Since core plugins are installed into the same directory as the Nushell binary, this simply adds that directory to the default `$NU_PLUGIN_DIRS`. User-facing changes: The default directory for core plugins is automatically added to the `$NU.PLUGIN_DIRS` with no user action necessary. Uses can immediately, out-of-the-box: ```nushell plugin add nu_plugin_polars plugin use polars ```
This commit is contained in:
parent
f33a26123c
commit
6aed1b42ae
@ -167,9 +167,10 @@ fn main() -> Result<()> {
|
||||
);
|
||||
working_set.set_variable_const_val(
|
||||
var_id,
|
||||
Value::test_list(vec![Value::test_string(
|
||||
default_nu_plugin_dirs_path.to_string_lossy(),
|
||||
)]),
|
||||
Value::test_list(vec![
|
||||
Value::test_string(default_nu_plugin_dirs_path.to_string_lossy()),
|
||||
Value::test_string(current_exe_directory().to_string_lossy()),
|
||||
]),
|
||||
);
|
||||
engine_state.merge_delta(working_set.render())?;
|
||||
// End: Default NU_LIB_DIRS, NU_PLUGIN_DIRS
|
||||
|
Loading…
Reference in New Issue
Block a user