[Feature] Ignore specific folders/files during hook search
Is your feature request related to a problem? Please describe.
When using hooks written in Javascript, the hook folder contains node_modules. Some executable files may exist in node_modules and the Shell Operator should ignore them.
Describe the solution you'd like to see
A language-neutral solution would be to support the use of an ignore file, similar to .gitignore. For example, one could create a file called .hookignore in the hook folder (or in a sub-folder):
node_modules
lib/*.js
A stretch goal would to be support inclusions, to allow for hook files to be explicitly selected:
# Ignore everything
**
# Allow specific hooks
!/hook-1.js
!/hook-2.js
Describe alternatives you've considered
The Shell Operator skips hidden files and folders (i.e. with a dot prefix), however node_modules cannot have a different name. A reasonable workaround is to use a symbolic link from the hook folder to a script that is installed elsewhere.