var d=(r,t,i)=>new Promise((n,s)=>{var e=o=>{try{a(i.next(o))}catch(c){s(c)}},l=o=>{try{a(i.throw(o))}catch(c){s(c)}},a=o=>o.done?n(o.value):Promise.resolve(o.value).then(e,l);a((i=i.apply(r,t)).next())});var p={custom:function(r,t){return d(this,null,function*(){let i=r.find(e=>e.includes(":")),n=r.find(e=>/^-.*n.*/.test(e)),s;if(i){let{stdout:e}=yield t({command:"bash",args:["-c","dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r"]});s=e}else{let{stdout:e}=yield t({command:"bash",args:["-c","dscl . -list /Users UniqueID | tr -s ' '| sort -r"]});s=e}return s.split(`
`).map(e=>e.split(" ")).map(e=>({name:n?e[1]:e[0],description:i?`Group - ${n?e[0]:`gid: ${e[1]}`}`:`User - ${n?e[0]:`uid: ${e[1]}`}`,icon:i?"\u{1F465}":"\u{1F464}",priority:90}))})},trigger:":",getQueryTerm:":"},f={name:"chown",description:"Change the user and/or group ownership of a given file, directory, or symbolic link",args:[{name:"owner[:group] or :group",generators:p},{name:"file/directory",isVariadic:!0,template:["filepaths","folders"]}],options:[{name:"-f",description:"Don't report any failure to change file owner or group, nor modify the exit status to reflect such failures"},{name:"-h",description:"If the file is a symbolic link, change the user ID and/or the group ID of the link itself"},{name:"-n",description:"Interpret user ID and group ID as numeric, avoiding name lookups"},{name:"-v",description:"Cause chown to be verbose, showing files as the owner is modified"},{name:"-R",description:"Change the user ID and/or the group ID for the file hierarchies rooted in the files instead of just the files themselves"},{name:"-H",description:"If the -R option is specified, symbolic links on the command line are followed",exclusiveOn:["-L","-P"],dependsOn:["-R"]},{name:"-L",description:"If the -R option is specified, all symbolic links are followed",exclusiveOn:["-H","-P"],dependsOn:["-R"]},{name:"-P",description:"If the -R option is specified, no symbolic links are followed",exclusiveOn:["-H","-L"],dependsOn:["-R"]}]},h=f;export{h as default,p as existingUsersandGroups};
