nushell.github.io
nushell.github.io copied to clipboard
Documention example for migrating from xargs
Is it possible to include this example to book/coming_from_bash.html, to demonstrates how to migrate xargs?
ls -Q ~/Downloads/*.mp4 | xargs mpv --shuffle --vid=no
(ls ~/Downloads/*.mp4).name | run-external "mpv" "--shuffle" "--vid=no" $in
Feel free to open a PR along those lines. I would recommend that the example only uses well known programs so you don't need to look for the example or install it to try.
This use-case is covered using xargs vim in the doc, and the syntax has been updated to include the list spreader operator.
| Bash | Nushell |
|---|---|
find . -name Makefile | xargs vim |
ls **/Makefile | get name | vim ...$in |
I think we can close this one as completed.