Closed blueyed closed 9 years ago
But it has the short -r option for comparability? (http://www.freebsd.org/cgi/man.cgi?query=xargs)
Sounds good, lets use -r
then.
Amended the commit.
Actually no, unfortunately it still doesn't work.
For reference, here's man xargs
on my Mac, it doesn't have the -r
either: https://gist.github.com/wellle/719a7fea9d3243bcce92
Sorry for all the back and fourth.
Does it behave like with -r
though?
What does echo | xargs echo 1
say for you?
Yes that screenshot was with the -r
version. It looked similar with --no-run-if-empty
.
It prints nothing:
~: echo | xargs echo 1
~:
Ok. A workaround might be to use -r
conditionally then, or test for the list before calling capturepane (what I've done now).
Yeah I think checking the list is the cleanest approach. Now you can remove the -r
again.
Yes, amended the commit(s).
Beautiful, thank you :+1:
Good stuff!
But
--no-run-if-empty
is not available for BSD xargs (like on Mac OS). Do you see a more portable way?