Skip to content

Commit c01feb2

Browse files
committed
Better handle accentued char in Seal filesearch plugin
1 parent 8eba686 commit c01feb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Source/Seal.spoon/seal_filesearch.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ end
128128
function SpotlightFileSearch:buildSpotlightQuery()
129129
local queryWords = hs.fnutils.split(self.query, "%s+")
130130
local searchFilters = hs.fnutils.map(queryWords, function(word)
131-
return [[kMDItemFSName like[c] "*]] .. word .. [[*"]]
131+
-- [c] means case-insensitive
132+
-- [d] means don't care about accents (diacritic)
133+
return [[kMDItemFSName like[cd] "*]] .. word .. [[*"]]
132134
end)
133135
local spotlightQuery = table.concat(searchFilters, [[ && ]])
134136
return spotlightQuery

0 commit comments

Comments
 (0)