Closed ArneBachmann closed 3 years ago
The misconception here is that tags find folders. Yes, findFolders returns a list of paths, but this is only a superset of paths for potential files to find. The problem comes with globs: ab*.?pp might mean all C++ source and header files of a certain glob, but could also mean a folder name, of which we would like to see all files. But latter is basically also returning a folder, but removing the tag from the findFiles remaining poss list. But when looking for an extension like .?pp we get a narrowed down list of paths, in which we still have to filter by the extension. How can we distinguish? We need a semantic decision here. The problem comes from the fact, that also folders may have an extension, but our assumption so far was that extensions demark files.
Currently all positive search terms are removed in findFiles, if they are found in the path's constituents. This would be the place to remove them as well, if we decide on a semantics.
Implemented above comment.
One further idea would be to allow duplicate search terms meaning "folder and file name alike".
Alternative would be different options like -s -x
for folders and -sf -xf
for files.
Opened issue #77.
Is this currently possible? What would break if we handled the "remaining" tags differently?