4 ms·
After playing with Nushell a bit, I think that you would do something like this: rg -0 -il -t java -t go sharded | split-row "\0" | rg -il jobqueue $it Instru
by tux1968 7y ago
After playing with Nushell a bit, I think that you would do something like this:
rg -0 -il -t java -t go sharded | split-row "\0" | rg -il jobqueue $it
Instructing "rg" to use Nul as a separator and where "split-row" acts like xargs. (This only worked after I modified Nushell to recognize "\0" as the Nul separator. It's surprising that this case hasn't come up many times previously, so maybe i just missed the proper way to do it).
Edit: Of course, not many filenames contain the newline character embedded in them, so usually this would be fine in an unmodified Nushell:
rg -il -t java -t go sharded | lines | rg -il jobqueue $it