Skip to content

Commit 0144e32

Browse files
amkhlvAndrei Mikhailov
andauthored
wrapped script in "def main [] {...}" (#1599)
Co-authored-by: Andrei Mikhailov <[email protected]>
1 parent 40cba31 commit 0144e32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

book/scripts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ For script to have access to standard input, `nu` should be invoked with `--stdi
175175

176176
```nu
177177
#!/usr/bin/env -S nu --stdin
178-
echo $"stdin: ($in)"
178+
def main [] {
179+
echo $"stdin: ($in)"
180+
}
179181
```
180182

181183
```nu

0 commit comments

Comments
 (0)