News for hackers. Stuff that matters.
Re:Nushell.sh ls | where size > 10mb | sort-by modified by Kwpolska on Sunday March 12, 2023 @03:55PM (#35125368)
What about it looks terrible? The braces are necessary, because this is a lambda.
Re:Nushell.sh ls | where size > 10mb | sort-by modified by doodlesdev on Sunday March 12, 2023 @03:59PM (#35125426)
I'd say that $_ is really weird and looks horrible. Also having to do (10 * 1024 * 1024) instead of just writing 10MB is a downgrade even compared to POSIX-compliant sh. In my other comment I've added a few examples in sh, zsh, and a better PowerShell example:

   gci | ? Length -gt 10MB | sort LastWriteTime
Re:Nushell.sh ls | where size > 10mb | sort-by modified by vips7L on Sunday March 12, 2023 @04:14PM (#35125627)
You don’t need the lambda. Where-Object can just take the Length property.