nushell / nushell.github.io

Nushell's main website, blog, book, and more
https://www.nushell.sh/book/
MIT License
166 stars 408 forks source link

Document dynamic command arguments #1298

Closed zerfix closed 5 months ago

zerfix commented 5 months ago

I had been wondering how to add arguments to commands directly without a new instance of the shell, as its not documented anywhere as far as i can tell.

Now that i have figured it out a way to do it, i thought id add it to the doc.

I'm not sure if it should be mentioned that "-a arg2" does not work, as they become one argument with space instead of the normal two arguments split by space as one would normally expect. That also means that one does not need to double wrap like '"long arg"'.

I guess it could also be mentioned that you can also have static arguments instead of, or in addition, like ^$"command" --static-arg ...$arguments.

fdncred commented 5 months ago

Thanks