var l=(g,r,t)=>new Promise((n,s)=>{var o=e=>{try{i(t.next(e))}catch(c){s(c)}},a=e=>{try{i(t.throw(e))}catch(c){s(c)}},i=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);i((t=t.apply(g,r)).next())});var p={custom:(g,r,t)=>l(void 0,null,function*(){let{stdout:n}=yield r({command:"cat",args:[`${t.environmentVariables.HOME}/.config/goto`]}),s=new Map;for(let o of n.split(`
`)){let a=o.split(" ");s.set(o,{name:a[0],description:"Goto "+a[1],icon:"\u{1F516}",priority:80})}return[...s.values()]})},m={name:"goto",displayName:"Goto a Folder by alias",options:[{name:["--help","-h"],description:"Show help for goto"},{name:["--register","-r"],description:"Registers an alias",isPersistent:!0,args:[{name:"alias"},{name:"target",template:"folders"}]},{name:["--unregister","-u"],description:"Unregister an alias",isPersistent:!0,args:{name:"alias",isDangerous:!0,generators:p,filterStrategy:"prefix"}},{name:["--push","-p"],description:"Pushes the current directory onto the stack, then performs goto"},{name:["--pop","-o"],description:"Pops the top directory from the stack, then changes to that directory"},{name:["--list","-l"],description:"Pops the top directory from the stack, then changes to that directory"},{name:["--expand","-x"],description:"Expands an alias",args:{name:"alias",generators:p}},{name:["--cleanup","-c"],description:"Cleans up non existent directory aliases"},{name:["--version","-v"],description:"Displays the version of the goto script"}],args:{name:"alias",generators:p}},h=m;export{h as default};
