Closed Kissaki closed 1 day ago
Thanks
How about?
if '$<variable>' in (scope variables).name { <command> }
@NotTheDr01ds I see. Not having to define a closure arguably means simpler syntax.
I wasn't aware in
could be used like that, with a list-collect+path-get.
I was thinking about potential performance differences as well, but it seems like (scope variables).name
would or could be streaming data in the same way.
Overall, I don't think there's a clear winner. They're alternative query approaches. Makes me wonder if adding both alternatives would make sense.
I do think this is more nushell idiomatic. This example should probably be updated.
'$rn' in (scope variables).name
I created #1643 for it.
Add if defined expression via
scope variables