diff --git a/crates/nu-command/src/core_commands/tutor.rs b/crates/nu-command/src/core_commands/tutor.rs index 1da23fa411..738777874b 100644 --- a/crates/nu-command/src/core_commands/tutor.rs +++ b/crates/nu-command/src/core_commands/tutor.rs @@ -368,10 +368,10 @@ rows, columns, or cells inside of the table. Shorthand paths are made from rows numbers, column names, or both. You can use them on any variable or subexpression. ``` -$nu.cwd +$env.PWD ``` -The above accesses the built-in `$nu` variable, gets its table, and then uses -the shorthand path to retrieve only the cell data inside the "cwd" column. +The above accesses the built-in `$env` variable, gets its table, and then uses +the shorthand path to retrieve only the cell data inside the "PWD" column. ``` (ls).name.4 ``` diff --git a/crates/nu-engine/src/eval.rs b/crates/nu-engine/src/eval.rs index b87a36dd60..4a33b6d3a4 100644 --- a/crates/nu-engine/src/eval.rs +++ b/crates/nu-engine/src/eval.rs @@ -1125,12 +1125,6 @@ pub fn eval_variable( } } - // since the env var PWD doesn't exist on all platforms - // lets just get the current directory - let cwd = current_dir_str(engine_state, stack)?; - output_cols.push("cwd".into()); - output_vals.push(Value::String { val: cwd, span }); - output_cols.push("scope".into()); output_vals.push(create_scope(engine_state, stack, span)?); diff --git a/docs/sample_config/default_config.nu b/docs/sample_config/default_config.nu index 94cfa97487..0e4579b922 100644 --- a/docs/sample_config/default_config.nu +++ b/docs/sample_config/default_config.nu @@ -1,7 +1,7 @@ # Nushell Config File def create_left_prompt [] { - let path_segment = ($nu.cwd) + let path_segment = ($env.PWD) $path_segment }