Closed gluxon closed 3 years ago
@alxbl Thanks for the review. @jedahan Any chance this can get a look? Thanks!
This looks good, though I wonder if we can use zsh's env substitution to achieve the same thing. Something like
conflict_list=$($_grep -cH '^=======$' ${conflicts/\n/\0/})
I think that should work as well and is indeed much simpler. Let me make sure later tonight and update this PR if there's no issues. Thanks!
Looks like we're going with #299, which has a more intuitive solution. 🙂 Closing this PR for now.
When the
$conflicts
shell variable contains newlines, the$_grep
command attempts to read the entire output as a single file. This results in "No such file or directory" errors.The fix here uses
xargs
to pass each file name individually.I was seeing this on macoS 10.15.4 with zsh 5.8 (x86_64-apple-darwin19.3.0).