3 ms·
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
by mbStavola 4y ago
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 } }
- msmart 4y agoI 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.
- evntdrvn 4y agoHave you tried opening up a feature suggestion? The maintainers are very receptive/helpful from my experiences.