-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace newline to space with xargs #3213
Conversation
Actually, files can have spaces in their names and in that case xargs is not enough. |
The GNU xargs option to use only the new line as a file separator should do the trick: |
I'm not sure that's enough? |
You are right, I had misunderstood the problem. Here's an idea: maybe you can use xargs in
then
|
echo $'foo bar.js\nbaz.js' | xargs -d $'\n' touch
ls You'll end up with a file called Finally, echo $'foo bar.js\nbaz.js' | tr '\n' '\0' | xargs -0 mkdir That replaces the newlines with null characters and then tells xargs to split on null characters. No need to run lint on one file at a time IMO. |
Thanks @AbeJellinek , I think we can trust you on this one. |
Hmm, in that case I don't think we need |
Oh hmm, actually not. Let me try your suggestion... |
(Still needs #3210 but otherwise sounds like it should work) |
What's the status on this? Is this PR still needed after the other CI fixes? |
(I'm assuming yes but I just want to be sure this is still something we want to merge. Hard to test CI!) |
Yes, otherwise changing multiple files would trigger the linter failure. |
Thanks! |
So that the resulting command would be
eslint file1 file2
rather thaneslint file1\nfile2
.