diff --git a/crates/nu-utils/src/default_files/default_env.nu b/crates/nu-utils/src/default_files/default_env.nu index 2e2d66f0bc..66b442ce7a 100644 --- a/crates/nu-utils/src/default_files/default_env.nu +++ b/crates/nu-utils/src/default_files/default_env.nu @@ -39,10 +39,3 @@ $env.PROMPT_COMMAND_RIGHT = $env.PROMPT_COMMAND_RIGHT? | default {|| ([$last_exit_code, (char space), $time_segment] | str join) } - -$env.ENV_CONVERSIONS = { - "PATH": { - from_string: { |s| $s | split row (char esep) | path expand --no-symlink } - to_string: { |v| $v | path expand --no-symlink | str join (char esep) } - } -} diff --git a/src/main.rs b/src/main.rs index 1c82e58851..7d39aef02b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,7 @@ use nu_cli::gather_parent_env_vars; use nu_lsp::LanguageServer; use nu_path::canonicalize_with; use nu_protocol::{ - engine::EngineState, report_shell_error, ByteStream, Config, IntoValue, PipelineData, + engine::EngineState, record, report_shell_error, ByteStream, Config, IntoValue, PipelineData, ShellError, Span, Spanned, Type, Value, }; use nu_std::load_standard_library; @@ -285,6 +285,11 @@ fn main() -> Result<()> { ); perf!("$env.config setup", start_time, use_color); + engine_state.add_env_var( + "ENV_CONVERSIONS".to_string(), + Value::test_record(record! {}), + ); + start_time = std::time::Instant::now(); if let Some(include_path) = &parsed_nu_cli_args.include_path { let span = include_path.span;