mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
replace filter
with where
(#1135)
This PR tries to clean up the use of `filter` by replacing it with `where`. I did not test each script. closes #1134 closes #1133
This commit is contained in:
parent
84c25bbc6d
commit
32cdc96414
25 changed files with 66 additions and 66 deletions
|
@ -77,7 +77,7 @@ export def --wrapped level [
|
|||
| each (do $env.lg.line_formatter $theme $align $mkl)
|
||||
| str join (char newline)
|
||||
let head = [$time $label $txt]
|
||||
| filter {|x| $x | is-not-empty }
|
||||
| where {|x| $x | is-not-empty }
|
||||
| str join $theme.delimiter
|
||||
[$head $body] | str join (char newline)
|
||||
} else {
|
||||
|
@ -85,7 +85,7 @@ export def --wrapped level [
|
|||
| each {|y| $"($theme.bg)($y.k)=($theme.fg)($y.v)"}
|
||||
| str join ' '
|
||||
[$time $label $tag $txt]
|
||||
| filter {|x| $x | is-not-empty }
|
||||
| where {|x| $x | is-not-empty }
|
||||
| str join $theme.delimiter
|
||||
}
|
||||
$r + $theme.terminal | do $output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue