News for hackers. Stuff that matters.
Re:Nushell 0.60 Released by nerdponx on Wednesday March 23, 2022 @11:12AM (#30779279)
Is there a command to string-ify the input so that you can use standard Unix coreutils, etc. on it?

This was always my big annoyance with Powershell too, the shell builtins and functions were powerful, but interacting with "dumb" old-style programs that expect and emit streams of text was cumbersome.

Also, is `ps` here a wrapper or shell builtin? Or is Nushell actually parsing the output from the `ps` program?

Re:Nushell 0.60 Released by ripley12 on Wednesday March 23, 2022 @11:33AM (#30779523)
ps is a shell builtin in Nu (and you can check that with `which ps`).

Going from Nu to raw text is currently a little awkward. `str collect (char nl)` will take a Nu list of strings and convert it to raw text with line breaks. I suspect we'll get a more ergnomic way to do this soon.

Going to Nu from raw text is nicer, the built-in `lines` command splits line-break-delimited text into a list of strings. From there you can use lots of Nu tools to operate on each line.