Skip to content

Commit 65a1633

Browse files
authored
Add pwd command to stdlib (nushell#9607)
Closes nushell#9601
1 parent 1bdec1c commit 65a1633

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crates/nu-std/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ use std dirs [
5959
p
6060
dexit
6161
]
62+
use std pwd
6263
"#
6364
);
6465

crates/nu-std/std/mod.nu

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,8 @@ It's been this long since (ansi green)Nushell(ansi reset)'s first commit:
286286
Startup Time: ($nu.startup-time)
287287
"
288288
}
289+
290+
# Return the current working directory
291+
export def pwd [] {
292+
$env.PWD
293+
}

0 commit comments

Comments
 (0)