mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 06:30:08 +02:00
Add long options for filters (#10641)
This commit is contained in:
@ -89,7 +89,7 @@ export def find-index [ # -> int
|
||||
export def intersperse [ # -> list<any>
|
||||
separator: any # the separator to be used
|
||||
] {
|
||||
reduce -f [] {|it, acc|
|
||||
reduce --fold [] {|it, acc|
|
||||
$acc ++ [$it, $separator]
|
||||
}
|
||||
| match $in {
|
||||
@ -122,7 +122,7 @@ export def scan [ # -> list<any>
|
||||
fn: closure # the closure to perform the scan
|
||||
--noinit(-n) # remove the initial value from the result
|
||||
] {
|
||||
reduce -f [$init] {|it, acc|
|
||||
reduce --fold [$init] {|it, acc|
|
||||
$acc ++ [(do $fn ($acc | last) $it)]
|
||||
}
|
||||
| if $noinit {
|
||||
@ -219,4 +219,4 @@ export def zip-into-record [ # -> table<any>
|
||||
into record
|
||||
| append ($other | into record)
|
||||
| headers
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ def create-test-record [] nothing -> record<before-each: string, after-each: str
|
||||
get 0
|
||||
}
|
||||
}
|
||||
| transpose -i -r -d
|
||||
| transpose --ignore-titles -r -d
|
||||
)
|
||||
|
||||
$template_record
|
||||
|
Reference in New Issue
Block a user