forked from extern/nushell
Sleep command (#2381)
* Add deserialization of Primitive::Duration; Fixes #2373 * Implement Sleep command * Add comment saying you should name your rest field "rest" * Fix typo * Add documentation for sleep command
This commit is contained in:
@ -293,6 +293,8 @@ impl Signature {
|
||||
}
|
||||
|
||||
/// Set the type for the "rest" of the positional arguments
|
||||
/// Note: Not naming the field in your struct holding the rest values "rest", can
|
||||
/// cause errors when deserializing
|
||||
pub fn rest(mut self, ty: SyntaxShape, desc: impl Into<String>) -> Signature {
|
||||
self.rest_positional = Some((ty, desc.into()));
|
||||
self
|
||||
|
Reference in New Issue
Block a user