You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using black to format long lists of files, one must use a tool like xargs to avoid triggering the platform's maximum command-line length. For example, if I want to clean up the modified files in my workspace, I can't write this:
black $(git status --porcelain | cut -c3- | grep -e '*.py$')
Because the command-line would overflow. Instead, I have to write it this way, triggering black multiple times:
$(git status --porcelain | cut -c3- | grep -e '*.py$') | xargs black
(Yes, yes, I know that's not properly escaping the filenames...the point here is just that black is triggered multiple times, rather than once.)
Describe the solution you'd like
I would love some syntax to pass more files to black than will fit on my platform's command-line, perhaps similar to the way git add works, in that if this is in danger of overflowing:
git add -- $(command that generates many files)
It can be replaced by a single invocation:
$(command that generates many files) | git add --pathspecs-from-file=-
Describe alternatives you've considered
Using xargs to invoke black multiple times.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When using
black
to format long lists of files, one must use a tool likexargs
to avoid triggering the platform's maximum command-line length. For example, if I want to clean up the modified files in my workspace, I can't write this:Because the command-line would overflow. Instead, I have to write it this way, triggering black multiple times:
(Yes, yes, I know that's not properly escaping the filenames...the point here is just that
black
is triggered multiple times, rather than once.)Describe the solution you'd like
I would love some syntax to pass more files to black than will fit on my platform's command-line, perhaps similar to the way
git add
works, in that if this is in danger of overflowing:It can be replaced by a single invocation:
Describe alternatives you've considered
Using
xargs
to invokeblack
multiple times.The text was updated successfully, but these errors were encountered: