Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: add a command to help parsing arguments in scripts #875

Merged
merged 5 commits into from
Jul 21, 2024

Conversation

amtoine
Copy link
Member

@amtoine amtoine commented Jun 8, 2024

the other day, i was writing a script and wanted to pass a list<int> to it which is not possible because there is no such things as types for externals 🤔

i ended up writing an "arg parsing" command to help in that task and thought it could be useful to people 😇

in this MR, i add std-rfc parse-arg in the script-parsing.nu module and add associated tests which all pass.

i invite the reader to have a look at the docstring of parse-arg which should contain a full example explaining the usage of this new command 😉

@fdncred fdncred merged commit 71f5736 into nushell:main Jul 21, 2024
1 check passed
@fdncred
Copy link
Collaborator

fdncred commented Jul 21, 2024

interesting. thanks.

@amtoine amtoine deleted the script-arg-parsing branch July 25, 2024 19:29
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.

2 participants