Add command "reduce" (#2292)

* initial

* fold working

* tests and cleanup

* change command to reduce, with fold flag

* move complex example to tests

* add --numbered flag
This commit is contained in:
Bailey Layzer
2020-08-04 10:16:19 -07:00
committed by GitHub
parent 7f35bfc005
commit e1c5940b04
7 changed files with 289 additions and 5 deletions

View File

@ -349,6 +349,14 @@ impl ShellError {
.start()
}
pub fn missing_value(span: impl Into<Option<Span>>, reason: impl Into<String>) -> ShellError {
ProximateShellError::MissingValue {
span: span.into(),
reason: reason.into(),
}
.start()
}
pub fn invalid_integer_index(
subpath: Spanned<impl Into<String>>,
integer: impl Into<Span>,