Skip to content

Commit 6ba5776

Browse files
authored
Fix 'Creating Modules' code examples (#1609)
1 parent 9c22e21 commit 6ba5776

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/modules/creating_modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Now it works as expected:
8989

9090
```nu
9191
use ./increment.nu
92-
2024 | inc
92+
2024 | increment
9393
# => 2025
9494
```
9595

@@ -333,7 +333,7 @@ As with any command defined without `--env`, commands and other definitions in t
333333
```nu
334334
export def examine-module [] {
335335
# Changes the PWD environment variable
336-
cd $env.CURRENT_FILE
336+
cd ($env.CURRENT_FILE | path dirname)
337337
ls
338338
}
339339
```

0 commit comments

Comments
 (0)