If scripts in a git repository don't have a .sh extension and are spread across various directories it's cumbersome to use shfmt in a pre-commit hook. It would be useful if shfmt could skip non-shell files when invoked from a git hook with the list of files being changed (as it is the case with pre-commit).
This is similar to #288, but different, because the desired behavior here would be that not explicit configuration is required. Rather, shfmt should "magically" skip non-shell files.