It's not a different approach though. It works exactly the same way in powershell(just the host language is different).
Thanks, I wasn't aware of that. I believe my comment still applies to nushell and a couple of others.
I like bash for simple commands, but hate the requirement to learn so many sublanguages for more sophisticated usage, (as in sed, awk, find, and others). I like Python for scripting, but the integration of shell commands is really not very good. I built marcel to fix both of these problems.
Powershell scripting is still done in the powershell language, but you can import all of the .net/c# runtime to use.
I'd like to build the same but using the JVM/groovy as the runtime/scripting language.
Scripting is done in Python, using marcel's shell commands as functions, by importing the module marcel.api. So the examle above in Python would be:
So it's the same shell command (ls ... | select ...), but expressed as Python functions, and the result is an iterator so that the command output can be used inside a for loop.For more info: https://www.marceltheshell.org, https://github.com/geophile/marcel.