Here's what I use to a list modified files suitable for command line substitution in bash
git diff --numstat -b -w | grep ^[1-9] | cut -f 3
To edit the list use $(cmd)
substitution.
vi $(git diff --numstat -b -w | grep ^[1-9] | cut -f 3)
Doesn't work if the file names have spaces. I tried to use sed
to escape or quote the spaces and the output list looked right, but the $()
substitution still did not behave as desired.