id = "mdfind" name = "mdfind" description = "Find files with Spotlight." executables = ["mdfind"] platforms = ["macos"] [commands] format = 1 label = "Search with Spotlight" description = "Query the Spotlight index. Smart-folder and live-update modes are left out." quality = "ai-draft" base = "fig:mdfind" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/mdfind.ts" license = "MIT" [[commands.field]] id = "query" label = "Query" type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "onlyin" label = "Limit to directory" type = "path" option = ["-onlyin"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.field]] id = "name" label = "File name" description = "Match file names only." type = "string" option = ["-name"] sources = ["fig"] [[commands.field]] id = "count" label = "Count matches only" type = "boolean" option = ["-count"] sources = ["fig"] [[commands.field]] id = "null" label = "NUL-separated results" type = "boolean" option = ["-0"] sources = ["fig"] [[commands.field]] id = "literal" label = "Literal query string" type = "boolean" option = ["-literal"] sources = ["fig"] [[commands.field]] id = "interpret" label = "Interpret like Spotlight menu" type = "boolean" option = ["-interpret"] sources = ["fig"] [[commands.task]] id = "by_name" label = "Find by name" fields = ["name", "onlyin"] required = ["name"] [[commands.task]] id = "query" label = "Run a query" fields = ["query", "onlyin"] required = ["query"] [[commands.group]] id = "basic" label = "Basic" fields = ["query", "onlyin", "name"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["count", "null", "literal", "interpret"]