Skip to content

make positional parameters more searchable#1859

Merged
NotTheDr01ds merged 2 commits into
nushell:mainfrom
sunnyzanchi:positional
Apr 3, 2025
Merged

make positional parameters more searchable#1859
NotTheDr01ds merged 2 commits into
nushell:mainfrom
sunnyzanchi:positional

Conversation

@sunnyzanchi
Copy link
Copy Markdown
Contributor

just a small change to try and make this page more searchable. 🙂 i was searching for "positional arguments" and "positional parameters" and this page wasn't in the results, but it's exactly what i was looking for

Comment thread book/scripts.md Outdated
## Parameterizing Scripts

Script files can optionally contain a special "main" command. `main` will be run after any other Nu code, and is primarily used to add parameters to scripts. You can pass arguments to scripts after the script name (`nu <script name> <script args>`).
Script files can optionally contain a special "main" command. `main` will be run after any other Nu code, and is primarily used to add parameters to scripts, like POSIX positional parameters. You can pass arguments to scripts after the script name (`nu <script name> <script args>`).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tweaking this, I think there is nothing particularly POSIX about how we handle arguments so I would say

like positional parameters or flags

Copy link
Copy Markdown
Contributor

@NotTheDr01ds NotTheDr01ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with @sholderbach and have provided a suggested change that still gets that "searchability" without mentioning POSIX.

Comment thread book/scripts.md Outdated
Co-authored-by: Douglas <32344964+NotTheDr01ds@users.noreply.github.com>
@sunnyzanchi
Copy link
Copy Markdown
Contributor Author

thanks for the replies! and fair point about POSIX. i committed your suggestion @NotTheDr01ds, should be good to go!

Copy link
Copy Markdown
Contributor

@NotTheDr01ds NotTheDr01ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@NotTheDr01ds NotTheDr01ds merged commit 17c078c into nushell:main Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants