News for hackers. Stuff that matters.
Re:Nushell.sh ls | where size > 10mb | sort-by modified by mbStavola on Sunday March 12, 2023 @03:14PM (#35124811)
I have nothing but positive things to say about nushell, but I do wish the describe command took a positional argument rather than just being piped into. I was trying to write a pipeline that could give me all the versions from a Cargo.toml and "flatten" any records, but got stuck trying to use describe. Ex:

open Cargo.toml | get dependencies | transpose | rename dep version | each { |row| let version = $row.version; if (describe $version) =~ "record" { $version.version } else { $version } }

Re:Nushell.sh ls | where size > 10mb | sort-by modified by msmart on Sunday March 12, 2023 @03:38PM (#35125135)
I would use

open Cargo.toml | get dependencies | transpose | rename dep version | each { |row| if (($row.version | get -i version | default "" ) != "") { $row.version.version } else { $row.version } }

not sure whether that's the best way.

Re:Nushell.sh ls | where size > 10mb | sort-by modified by evntdrvn on Sunday March 12, 2023 @04:53PM (#35126128)
Have you tried opening up a feature suggestion? The maintainers are very receptive/helpful from my experiences.