forked from extern/nushell
71b99edd48
* Add rest arg to def This commit applied adds the ability to define the rest parameter of a def command. It does not implement the functionality to expand the rest argument in a user defined def function. The rest argument has to be exactly worded "...rest". Example after this PR is applied: file test.nu ```shell def my_command [ ...rest:int # My rest arg ] { echo 1 2 3 } ``` ```shell > source test.nu > my_command -h Usage: > my_command ...args {flags} Parameters: ...args: My rest arg Flags: -h, --help: Display this help message ``` * Fix space in help on wrong side |
||
---|---|---|
.. | ||
nu_plugin_binaryview | ||
nu_plugin_chart | ||
nu_plugin_fetch | ||
nu_plugin_from_bson | ||
nu_plugin_from_sqlite | ||
nu_plugin_inc | ||
nu_plugin_match | ||
nu_plugin_post | ||
nu_plugin_ps | ||
nu_plugin_s3 | ||
nu_plugin_selector | ||
nu_plugin_start | ||
nu_plugin_sys | ||
nu_plugin_textview | ||
nu_plugin_to_bson | ||
nu_plugin_to_sqlite | ||
nu_plugin_tree | ||
nu_plugin_xpath | ||
nu-cli | ||
nu-command | ||
nu-data | ||
nu-engine | ||
nu-errors | ||
nu-json | ||
nu-parser | ||
nu-plugin | ||
nu-protocol | ||
nu-source | ||
nu-stream | ||
nu-table | ||
nu-test-support | ||
nu-value-ext |