var m=(d,a,r)=>new Promise((o,e)=>{var n=t=>{try{s(r.next(t))}catch(c){e(c)}},i=t=>{try{s(r.throw(t))}catch(c){e(c)}},s=t=>t.done?o(t.value):Promise.resolve(t.value).then(n,i);s((r=r.apply(d,a)).next())});var p={custom:(d,a,r)=>m(void 0,null,function*(){let{stdout:o}=yield a({command:"ls",args:["-1A",`${r.environmentVariables.HOME}/Library/Saved Searches/`]});return o.split(`
`).filter(e=>e.endsWith("savedSearch")).map(e=>{let n=e.split("/"),i=n[n.length-1];return{name:i.substring(0,i.indexOf(".")),displayName:i,icon:"fig://"+e,description:"Smart folder"}})}),trigger:"/"},l={name:"mdfind",description:"Finds files matching a given query",parserDirectives:{flagsArePosixNoncompliant:!0},options:[{name:["--help","-h"],description:"Show help for mdfind"},{name:"-0",description:"Prints an ASCII NUL character after each result path"},{name:"-live",description:"Provide live-updates to the number of files matching the query"},{name:"-count",description:"Output the total number of matches, instead of the path to the matching items"},{name:"-onlyin",description:"Limit the scope of the search to <dir>",args:{name:"dir",description:"Directory",template:"folders"}},{name:"-name",description:"Search for matching file names to <filename> only",args:{name:"filename"}},{name:"-reprint",description:"Reprint results on live update"},{name:"-s",description:"Show contents of smart folder ~/Library/Saved Searches/<folder>.savedSearch",args:{name:"folder",description:"Smart folder in  ~/Library/Saved Searches",generators:p}},{name:"-literal",description:"Force the provided query string to be taken as a literal query string, without interpretation"},{name:"-interpret",description:"Force the provided query string to be interpreted as if it had been typed into the Spotlight menu"}],args:{name:"query"}},f=l;export{f as default};
