This extension for efind provides functions to filter search results by file extension and mime-type.
Tests if the extension of the found file equals extension.
$ efind . 'extension_equals(".txt") or extension_equals(".TXT")'
Tests if the extension of the found file equals extension. The string comparison is case in-sensitive.
$ efind . 'extension_equals_icase(".TxT")'
Tests if the comma-separated list extensions contains the file extension of the found file.
$ efind . 'extension_in(".c, .h")'
Tests if the comma-separated list extensions contains the file extension of the found file. The string comparison is case-insensitive.
$ efind . 'extension_in_icase(".cpp, .Hpp")'
Tests if the mime-type of the found file is equal to mime-type.
$ efind . 'mime_equals("text/html") or mime_equals("text/plain")'
Copy the Python script to ~/.efind/extensions or run the install.sh shell script.