mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 02:55:07 +02:00
Allow rest vars to have a custom name
This commit is contained in:
@ -108,9 +108,14 @@ impl Signature {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn rest(mut self, shape: impl Into<SyntaxShape>, desc: impl Into<String>) -> Signature {
|
||||
pub fn rest(
|
||||
mut self,
|
||||
name: &str,
|
||||
shape: impl Into<SyntaxShape>,
|
||||
desc: impl Into<String>,
|
||||
) -> Signature {
|
||||
self.rest_positional = Some(PositionalArg {
|
||||
name: "rest".into(),
|
||||
name: name.into(),
|
||||
desc: desc.into(),
|
||||
shape: shape.into(),
|
||||
var_id: None,
|
||||
|
Reference in New Issue
Block a user