Skip to content

Commit

Permalink
Better handle accentued char in Seal filesearch plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
yannrouillard committed Jun 11, 2023
1 parent 8eba686 commit c01feb2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Seal.spoon/seal_filesearch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ end
function SpotlightFileSearch:buildSpotlightQuery()
local queryWords = hs.fnutils.split(self.query, "%s+")
local searchFilters = hs.fnutils.map(queryWords, function(word)
return [[kMDItemFSName like[c] "*]] .. word .. [[*"]]
-- [c] means case-insensitive
-- [d] means don't care about accents (diacritic)
return [[kMDItemFSName like[cd] "*]] .. word .. [[*"]]
end)
local spotlightQuery = table.concat(searchFilters, [[ && ]])
return spotlightQuery
Expand Down

0 comments on commit c01feb2

Please sign in to comment.