SUMMARY When using the filter in Dolphin `Ctrl` + `I`, it should support a simple exclude like many are used to in search, like `-exclude_term`. Example directory: Folder ├── doc2.assets ├── doc2.md ├── doc.assets └── doc.md STEPS TO REPRODUCE 1. Filter: `-*.assets` OBSERVED RESULT Actual: blank results (all items filtered) EXPECTED RESULT Folder ├── doc2.md └── doc.md SOFTWARE/OS VERSIONS Linux/KDE Plasma: 5.4.67-1-MANJARO KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74.0 Qt Version: 5.15.1 ADDITIONAL INFORMATION This is the form many are already used to from searching with things like Google and would be very nice to support in Dolphin.
Currently the filter bar uses the Qt regex engine which in turn is Perl regexes. This would require switching to another filter engine which supports that kind of syntax.
> This would require switching to another filter engine which supports that kind of syntax. Or could the feature perhaps look like a "mode" for the filter bar, where the same regex engine is being used, but its result are negated?
(In reply to Elvis Angelaccio from comment #1) > This would require switching to another filter engine which supports that > kind of syntax. For exclusion rather than inclusion of the regex, there is no need to switch the engine. You have the full list of files and the filtered one. You only need to remove the filtered ones from the full list, to get the exclude list. In example: 1. Unfiltered Filter: Folder ├── doc2.assets ├── doc2.md ├── doc.assets └── doc.md 2. Filtered Filter: *.assets Folder ├── doc2.assets └── doc.assets Take the Unfiltered list, then remove every file from the Filtered list. Voila you get the Excluded list: 3. Excluded Filter: !*.assets Folder ├── doc2.md └── doc.md
This seems reasonable The code can be made to translate "-exclude" so that the Perl regex would do the right thing