id = "mdls" name = "mdls" description = "List metadata attributes of files." executables = ["mdls"] platforms = ["macos"] [commands] format = 1 label = "Show file metadata" description = "List Spotlight metadata attributes of files. The plist output option is left out." quality = "ai-draft" base = "fig:mdls" 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/mdls.ts" license = "MIT" [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "any", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "name" label = "Attribute" description = "Print only this attribute. Repeat for several." type = "string" option = ["-name"] multiple = true suggestions = [{ value = "kMDItemContentType", label = "Content type" }, { value = "kMDItemDisplayName", label = "Display name" }, { value = "kMDItemContentCreationDate", label = "Created" }, { value = "kMDItemContentModificationDate", label = "Modified" }, { value = "kMDItemDateAdded", label = "Date added" }] sources = ["fig"] [[commands.field]] id = "raw" label = "Raw output" type = "boolean" option = ["-raw"] sources = ["fig"] [[commands.task]] id = "all" label = "All metadata" fields = ["files"] required = ["files"] [[commands.task]] id = "content_type" label = "Content type only" fields = ["files", "name"] required = ["files"] set = { name = ["kMDItemContentType"] } [[commands.group]] id = "basic" label = "Basic" fields = ["files", "name"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["raw"]