Skip to content

Commit

Permalink
Fix zip signature to mention closure input type (nushell#12216)
Browse files Browse the repository at this point in the history
# Description

`help zip` now reports:

```
other <one_of(any, closure())>: The other input, or closure returning a stream.
```

Thanks to @edhowland for pointing this out ❤️

# User-Facing Changes

- Doc change for zip

# Tests + Formatting
- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting
  • Loading branch information
devyn authored Mar 16, 2024
1 parent 1cb5221 commit a5d03b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/nu-command/src/filters/zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ impl Command for Zip {
Type::List(Box::new(Type::List(Box::new(Type::Any)))),
),
])
.required("other", SyntaxShape::Any, "The other input.")
.required(
"other",
SyntaxShape::OneOf(vec![SyntaxShape::Any, SyntaxShape::Closure(Some(vec![]))]),
"The other input, or closure returning a stream.",
)
.category(Category::Filters)
}

Expand Down

0 comments on commit a5d03b1

Please sign in to comment.