## Summary
This PR removes the required positional argument from the `which`
command, allowing it to accept input via the spread (`...`) operator.
This enables expressions like:
```nu
[notepad cmd] | which ...$in
```
Previously, this failed due to a missing required positional argument.
The Nushell runtime already handles empty input gracefully, so the
change aligns with existing behavior.
---
## Motivation
Making `which` compatible with splatted input improves composability and
aligns with user expectations in scriptable environments. It supports
patterns where the input may be constructed dynamically or piped in from
earlier commands.
---
## Changes
* Removed the `required` attribute from the positional argument in the
`which` command signature.
* No additional runtime logic required since empty input is handled
gracefully already.
---
## Examples
### Before
```nu
[notepad cmd] | which ...$in
# ❌ Error: Missing required positional argument
```
### After
```nu
[notepad cmd] | which ...$in
# ✅ Executes correctly
```
---
## Testing
* Ran `cargo test --all` and `cargo test -p nu-command`
* Manually tested using spread input with the `which` command
* Confirmed that empty and non-empty inputs behave correctly
---
## Related Issues
Closes
[[#15801](https://github.com/nushell/nushell/issues/15801)](https://github.com/nushell/nushell/issues/15801)
---------
Co-authored-by: Kumar Ujjawal <kumar.ujjawal@greenpista.com>