nushell/crates/nu-command
Jelle Besseling 44493dac51
Add extern def which allows raw arguments (#8956)
# Description

Extends the `extern` syntax to allow commands that accept raw arguments.
This is mainly added to allow wrapper type scripts for external
commands.

This is an example on how this can be used:

```nushell
extern foo [...rest] { 
  print ($rest | str join ',' ) 
}
foo --bar baz -- -q -u -x
# => --bar,baz,--,-q,-u,-x
```

(It's only possible to accept a single ...varargs argument in the
signature)

# User-Facing Changes

No breaking changes, just extra possibilities.

# Tests + Formatting

Added a test for this new behaviour and ran the toolkit pr checker

# After Submitting

This is advanced functionality but it should be documented, I will open
a new PR on the book for that

Co-authored-by: Jelle Besseling <jelle@bigbridge.nl>
2023-04-28 09:06:43 +02:00
..
assets refactor html module (#5246) 2022-04-20 08:50:14 -05:00
src Fix unexpected flattening of data by par-each (Issue #8497) (#9007) 2023-04-26 23:27:27 +02:00
tests Add extern def which allows raw arguments (#8956) 2023-04-28 09:06:43 +02:00
Cargo.toml Bump tabled dependency to 0.11 (#8922) 2023-04-26 13:56:10 -05:00
LICENSE Fix rest of license year ranges (#8727) 2023-04-04 09:03:29 +12:00