this should return files containing nore but no jpg or jpeg files and no other files. HOWEVER instead it returns files containing nore INCLUDING jpg files, like it only cares about the first rule.... although if I don't include the "- *" it'll just include all files.
I tried using --include "nore" and --exclude "jpg" but that didn't block jpg files either...
can anyone help me please? what am I doing wrong here? I thought multiple filtering commands were supposed to work? clearly I'm typing something wrong.
The filters execute top down or left to right if you keep them on a line. So you'd want to put your excludes first, includes and finally the last exclude if that was your logic.
That should remove everything, add the star nore star files back in then remove the jpgs? Not entirely sure though.... because when I run this it still doesn't work, it gives me no results at all (whereas before I had dozens of valid ones and 1000s of jpg I didn't want)... plus in all the examples the "- *" always went last.... I think maybe it works reading from right to left not left to right? so really the right answer is:
I believe it is actually reading left-to-right and the second command is working as expected. As shown in the examples too, the all exclude line should always come at the last so as to not exclude everything.
It's working this way right now with your working command:
Exclude *.jpg
Exclude *.jpeg
Include *nore*
Exclude everything else (i.e *)
For the command, if you had -- * as the first filter, it would exclude everything and not have any results, which is the observed output.