diff --git a/command-signatures/json/amplify.json b/command-signatures/json/amplify.json index f65b3131..2502a118 100644 --- a/command-signatures/json/amplify.json +++ b/command-signatures/json/amplify.json @@ -594,10 +594,7 @@ "args": { "name": "env-name", "description": "Env name", - "generators": { - "script": "amplify env list --json", - "postProcess": "function(a){return JSON.parse(a).envs.map(t=>({name:t,description:\"Environment\"}))}" - } + "generatorName": "env_list" }, "options": [ { @@ -631,10 +628,7 @@ "args": { "name": "env-name", "description": "Env name", - "generators": { - "script": "amplify env list --json", - "postProcess": "function(a){return JSON.parse(a).envs.map(t=>({name:t,description:\"Environment\"}))}" - } + "generatorName": "env_list" } } ] @@ -650,10 +644,7 @@ "args": { "name": "env-name", "description": "Env name", - "generators": { - "script": "amplify env list --json", - "postProcess": "function(a){return JSON.parse(a).envs.map(t=>({name:t,description:\"Environment\"}))}" - } + "generatorName": "env_list" } }, { @@ -675,10 +666,7 @@ "args": { "name": "env-name", "description": "Env name", - "generators": { - "script": "amplify env list --json", - "postProcess": "function(a){return JSON.parse(a).envs.map(t=>({name:t,description:\"Environment\"}))}" - } + "generatorName": "env_list" } } ] diff --git a/command-signatures/json/ansible-doc.json b/command-signatures/json/ansible-doc.json index 0b0c105a..a02819ef 100644 --- a/command-signatures/json/ansible-doc.json +++ b/command-signatures/json/ansible-doc.json @@ -171,9 +171,6 @@ "name": "plugin", "isDangerous": true, "isVariadic": true, - "generators": { - "script": "ansible-doc --list --json 2>/dev/null", - "postProcess": "function(o){let e=JSON.parse(o);return Object.keys(e).map(n=>({name:n,description:e[n]}))}" - } + "generatorName": "completions" } } diff --git a/command-signatures/json/ansible-playbook.json b/command-signatures/json/ansible-playbook.json index 8855ab7f..d77abba0 100644 --- a/command-signatures/json/ansible-playbook.json +++ b/command-signatures/json/ansible-playbook.json @@ -5,10 +5,7 @@ "name": "playbook", "description": "Playbook(s)", "isVariadic": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let c=m.filter(({name:l=\"\",type:M})=>{if(s!==\"filter\"&&M===\"folder\")return s===\"always\";if(u.has(l)||a&&new RegExp(a.source,a.flags).test(l))return!0;let[,...f]=l.split(\".\");if(f.length>=1){let h=f.length-1,b=f[h];do{if(r.has(b))return!0;h-=1,b=[f[h],b].join(\".\")}while(h>=0)}return!1});return!i&&!o?c:c.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?i:o)||{}))}" - } + "template": "filepaths" }, "options": [ { diff --git a/command-signatures/json/apt.json b/command-signatures/json/apt.json index 791887bb..ad3af09c 100644 --- a/command-signatures/json/apt.json +++ b/command-signatures/json/apt.json @@ -26,14 +26,7 @@ "description": "Package(s) to upgrade", "isVariadic": true, "isOptional": true, - "generators": { - "script": [ - "apt", - "list", - "--upgradable" - ], - "postProcess": "function(e){return e.trim().split(`\n`).map(t=>({name:t.substring(0,t.indexOf(\"/\")),description:\"Package\",icon:\"\\u{1F4E6}\"}))}" - } + "generatorName": "list_upgradable" }, "options": [ { @@ -107,17 +100,7 @@ "name": "package", "description": "The package you want to install", "isVariadic": true, - "generators": [ - { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - }, - { - "trigger": "_NuFrRa_(g,m)=>{let O=g.lastIndexOf(\"/\"),p=m.lastIndexOf(\"/\");return O!==p?!0:O===-1&&p===-1?!1:g.slice(0,O)!==m.slice(0,p)}", - "getQueryTerm": "_NuFrRa_g=>g.slice(g.lastIndexOf(\"/\")+1)", - "custom": "_NuFrRa_(g,m,O)=>he(this,void 0,void 0,function*(){var p;let{isDangerous:k,currentWorkingDirectory:_,searchTerm:h}=O,x=(p=(0,v.getCurrentInsertedDirectory)(u??_,h,O))!==null&&p!==void 0?p:\"/\";try{let $=yield m({command:\"ls\",args:[\"-1ApL\"],cwd:x}),ie=Q($.stdout.split(`\n`),[\".DS_Store\"]),G=[];for(let L of ie)if(L){let D=L.endsWith(\"/\")?\"folders\":\"filepaths\";(D===\"filepaths\"&&l!==\"only\"||D===\"folders\"&&l!==\"never\")&&G.push({type:D===\"filepaths\"?\"file\":\"folder\",name:L,insertValue:L,isDangerous:k,context:{templateType:D}})}return S(y(G))}catch{return[]}})" - } - ] + "template": "filepaths" }, "options": [ { @@ -168,14 +151,7 @@ "name": "package", "description": "The package you want to reinstall", "isVariadic": true, - "generators": { - "script": [ - "apt", - "list", - "--installed" - ], - "postProcess": "function(e){return e.trim().split(`\n`).map(t=>({name:t.substring(0,t.indexOf(\"/\")),description:\"Package\",icon:\"\\u{1F4E6}\"}))}" - } + "generatorName": "list" }, "options": [ { @@ -204,14 +180,7 @@ "name": "package", "description": "The package you want to remove", "isVariadic": true, - "generators": { - "script": [ - "apt", - "list", - "--installed" - ], - "postProcess": "function(e){return e.trim().split(`\n`).map(t=>({name:t.substring(0,t.indexOf(\"/\")),description:\"Package\",icon:\"\\u{1F4E6}\"}))}" - } + "generatorName": "list" }, "options": [ { @@ -247,14 +216,7 @@ "name": "package", "description": "The package you want to purge", "isVariadic": true, - "generators": { - "script": [ - "apt", - "list", - "--installed" - ], - "postProcess": "function(e){return e.trim().split(`\n`).map(t=>({name:t.substring(0,t.indexOf(\"/\")),description:\"Package\",icon:\"\\u{1F4E6}\"}))}" - } + "generatorName": "list" }, "options": [ { @@ -342,10 +304,7 @@ "args": { "name": "package", "description": "The package you want to show", - "generators": { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - } + "template": "filepaths" } }, { @@ -355,10 +314,7 @@ "name": "package", "description": "The package you want to satisfy", "isVariadic": true, - "generators": { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - } + "template": "filepaths" }, "options": [ { @@ -437,10 +393,7 @@ "name": "package", "description": "The package you want to get source files for", "isVariadic": true, - "generators": { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - } + "template": "filepaths" }, "options": [ { @@ -492,10 +445,7 @@ "args": { "name": "package", "description": "The package you want to build dependencies for", - "generators": { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - } + "template": "filepaths" }, "options": [ { @@ -543,10 +493,7 @@ "args": { "name": "package", "description": "The package you want to download", - "generators": { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - } + "template": "filepaths" }, "options": [ { @@ -615,10 +562,7 @@ "args": { "name": "package", "description": "The package you want to show the changelog for", - "generators": { - "trigger": "_NuFrRa_(e,t)=>e.length===0||t.length===0&&e.length>0", - "custom": "_NuFrRa_(e,t)=>z(void 0,null,function*(){let n=e[e.length-1];if(n.length===0)return[];let{stdout:a}=yield t({command:\"apt\",args:[\"list\"]});return a.trim().split(`\n`).filter(i=>i.startsWith(n)).map(i=>i.replace(/\\/.*/,\"\")).map(i=>({name:i,description:\"Package\",icon:\"\\u{1F4E6}\",priority:50}))})" - }, + "template": "filepaths", "isVariadic": true }, "options": [ diff --git a/command-signatures/json/assimp.json b/command-signatures/json/assimp.json index f9d141e3..ae55e4cd 100644 --- a/command-signatures/json/assimp.json +++ b/command-signatures/json/assimp.json @@ -16,10 +16,7 @@ "args": { "name": "extension", "description": "Check whether a particular file extension is known by us", - "generators": { - "script": "assimp listext", - "postProcess": "function(t){return t.split(\";\").map(i=>({name:i,description:\"Extension\"}))}" - } + "generatorName": "listext" } }, { @@ -28,10 +25,7 @@ "args": { "name": "extension", "description": "Specific file extension", - "generators": { - "script": "assimp listexport", - "postProcess": "function(t){return t.split(`\n`).map(i=>({name:i,description:\"Extension\"}))}" - } + "generatorName": "listexport" } }, { @@ -98,10 +92,7 @@ "description": "Export file formats supported by Assimp", "args": { "name": "format", - "generators": { - "script": "assimp listexport", - "postProcess": "function(t){return t.split(`\n`).map(i=>({name:i,description:\"Extension\"}))}" - } + "generatorName": "listexport" } }, { diff --git a/command-signatures/json/bat.json b/command-signatures/json/bat.json index 544022e1..4b00afb3 100644 --- a/command-signatures/json/bat.json +++ b/command-signatures/json/bat.json @@ -24,10 +24,7 @@ "description": "Explicitly set the language for syntax highlighting", "args": { "name": "", - "generators": { - "script": "bat --list-languages", - "postProcess": "function(t){return t.split(`\n`).map(e=>{let i=e.split(\":\")[0].trim();return e.replace(/\\:/g,\",\").split(\",\").map(n=>({name:n.trim(),description:i+\" language\"}))}).flat(2)}" - } + "generatorName": "completions_bat" } }, { @@ -78,10 +75,7 @@ "description": "Specify when to use colored output", "args": { "name": "", - "generators": { - "script": "bat --wrap unknow 2>&1 >/dev/null | grep possible", - "postProcess": "function(t){return t.trim().split(\"]\")[0].split(\"[\")[1].split(\":\")[1].split(\",\").map(e=>({name:e.trim(),description:\"Specify when to use colored output\"}))}" - } + "generatorName": "unknow_dev_null_possible_wrap" } }, { @@ -104,10 +98,7 @@ "description": "Specify when to use colored output", "args": { "name": "", - "generators": { - "script": "bat --color unknow 2>&1 >/dev/null | grep possible", - "postProcess": "function(t){return t.trim().split(\"]\")[0].split(\"[\")[1].split(\":\")[1].split(\",\").map(e=>({name:e.trim(),description:\"Specify when to use colored output\"}))}" - } + "generatorName": "unknow_dev_null_possible_color" } }, { @@ -115,10 +106,7 @@ "description": "Specify when to use ANSI sequences for italic text in the output", "args": { "name": "", - "generators": { - "script": "bat --italic-text unknow 2>&1 >/dev/null | grep possible", - "postProcess": "function(t){return t.trim().split(\"]\")[0].split(\"[\")[1].split(\":\")[1].split(\",\").map(e=>({name:e.trim(),description:\"Specify when to use ANSI sequences for italic text in the output\"}))}" - } + "generatorName": "unknow_dev_null_possible_italic" } }, { @@ -126,10 +114,7 @@ "description": "Specify when to use the decorations that have been specified via '--style'", "args": { "name": "", - "generators": { - "script": "bat --decorations unknow 2>&1 >/dev/null | grep possible", - "postProcess": "function(t){return t.trim().split(\"]\")[0].split(\"[\")[1].split(\":\")[1].split(\",\").map(e=>({name:e.trim(),description:\"Specify when to use the decorations that have been specified via '--style'\"}))}" - } + "generatorName": "unknow_dev_null_possible_bat" } }, { @@ -144,10 +129,7 @@ "description": "Specify when to use the pager", "args": { "name": "", - "generators": { - "script": "bat --paging unknow 2>&1 >/dev/null | grep possible", - "postProcess": "function(t){return t.trim().split(\"]\")[0].split(\"[\")[1].split(\":\")[1].split(\",\").map(e=>({name:e.trim(),description:\"Specify when to use the pager\"}))}" - } + "generatorName": "unknow_dev_null_possible" } }, { @@ -182,10 +164,7 @@ "description": "Set the theme for syntax highlighting", "args": { "name": "", - "generators": { - "script": "bat --list-themes", - "postProcess": "function(t){return t.split(`\n`).map(e=>({name:e,description:\"theme: \"+e}))}" - } + "generatorName": "completions" } }, { diff --git a/command-signatures/json/black.json b/command-signatures/json/black.json index 0c049efe..38e8bcea 100644 --- a/command-signatures/json/black.json +++ b/command-signatures/json/black.json @@ -140,13 +140,7 @@ "description": "Require a specific version of Black", "args": { "name": "version", - "generators": { - "script": "gh release list --repo psf/black", - "cache": { - "ttl": 172800000 - }, - "postProcess": "_NuFrRa_e=>e.includes(\"Latest\")?e.split(`\n`).map(i=>({name:i.split(\"\t\")[0],description:\"Version\"})):[]" - } + "generatorName": "gh_release_list_psf_black" } }, { diff --git a/command-signatures/json/brew.json b/command-signatures/json/brew.json index 6699a39e..a176cdc9 100644 --- a/command-signatures/json/brew.json +++ b/command-signatures/json/brew.json @@ -287,9 +287,7 @@ "--analytics" ], "args": { - "generators": { - "custom": "_NuFrRa_e=>c(void 0,null,function*(){return e.slice(2,e.length-1).some(a=>a[0]!==\"-\")?[\"install\",\"install-on-request\",\"build-error\"].map(a=>({name:a})):[\"cask-install\",\"os-version\"].map(a=>({name:a}))})" - } + "template": "filepaths" } }, { @@ -390,9 +388,7 @@ "--analytics" ], "args": { - "generators": { - "custom": "_NuFrRa_e=>c(void 0,null,function*(){return e.slice(2,e.length-1).some(a=>a[0]!==\"-\")?[\"install\",\"install-on-request\",\"build-error\"].map(a=>({name:a})):[\"cask-install\",\"os-version\"].map(a=>({name:a}))})" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/bun.json b/command-signatures/json/bun.json index 048c50b8..90091356 100644 --- a/command-signatures/json/bun.json +++ b/command-signatures/json/bun.json @@ -68,11 +68,7 @@ "args": { "name": "order", "isVariadic": true, - "generators": { - "trigger": "_NuFrRa_(s,p)=>{let c=T(e,t,s),o=T(e,t,p);return c!==o}", - "getQueryTerm": "_NuFrRa_s=>{let p=T(e,t,s);return s.slice(p+1)}", - "custom": "_NuFrRa_(...s)=>R(this,void 0,void 0,function*(){let[p]=s,c=p[p.length-1],o=T(e,t,c),d=o===-1||c.slice(o,o+e.length)!==e;return H(d?n:i,a,s)})" - } + "template": "filepaths" }, "description": "Defaults to: .tsx,.ts,.jsx,.js,.json" }, @@ -555,14 +551,7 @@ "args": { "name": "package", "debounce": true, - "generators": { - "trigger": "_NuFrRa_(e,t)=>t.startsWith(\"@\")?!(E(t)>1&&E(e)>1):!(t.includes(\"@\")&&e.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(e,t)=>L(void 0,null,function*(){let n=e[e.length-1];if(n===\"\")return[];let i=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${n}\"`,a=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${n.slice(0,-1)}`,s=c=>c[c.length-1]===\"@\"?t(a):t(i),p=n.startsWith(\"@\")?E(n)>1:n.includes(\"@\");try{let c=JSON.parse(yield s(n));if(p){let o=Object.entries(c[\"dist-tags\"]||{}).map(([d,g])=>({name:d,description:g}));return o.push(...Object.keys(c.versions).map(d=>({name:d})).reverse()),o}return c.results.map(o=>({name:o.package.name,description:o.package.description}))}catch(c){return console.error({error:c}),[]}})" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/cargo.json b/command-signatures/json/cargo.json index 32347365..fa65cf17 100644 --- a/command-signatures/json/cargo.json +++ b/command-signatures/json/cargo.json @@ -1,6 +1,7 @@ { "name": "cargo", "description": "CLI Interface for Cargo", + "generateSpec": "_NuFrRa_(e,t)=>V(void 0,null,function*(){let a=[],n=(yield t(\"cargo --list\")).split(`\n`).filter((i,o)=>o!=0).map(i=>i.trim().split(/\\s+/,1)[0]);if(n.includes(\"fmt\")){let i={name:\"fmt\",icon:\"\\u{1F6E0}\",description:\"This utility formats all bin and lib files of the current crate using rustfmt\",subcommands:[{name:\"--\",description:\"All other arguments are passed to rustfmt\",args:{generators:(0,r.filepaths)({extensions:[\"rs\"]})},options:[{name:\"--check\",description:\"Run in 'check' mode. Exits with 0 if input is formatted correctly. Exits with 1 and prints a diff if formatting is required\"},{name:\"--emit\",description:\"What data to emit and how\",args:{suggestions:[\"files\",\"stdout\"]}},{name:\"--backup\",description:\"Backup any modified files\"},{name:\"--config-path\",description:\"Path for the configuration file\",args:{generators:(0,r.filepaths)({equals:[\"rustfmt.toml\"]})}},{name:\"--edition\",description:\"Rust edition to use\",args:{suggestions:x}},{name:\"--print-config\",description:\"Dumps a default or minimal config to PATH\",args:[{name:\"verbosity\",suggestions:[\"default\",\"minimal\",\"current\"]},{name:\"PATH\",template:\"filepaths\"}]},{name:[\"-l\",\"--files-with-diff\"],description:\"Prints the names of mismatched files that were formatted\"}]}],options:[{name:\"--check\",description:\"Run rustfmt in check mode\"},{name:\"--all\",description:\"Format all packages, and also their local path-based dependencies\"},{name:[\"-h\",\"--help\"],description:\"Print help information\"},{name:[\"-q\",\"--quiet\"],description:\"No output printed to stdout\"},{name:[\"-v\",\"--verbose\"],description:\"Use verbose output\"},{name:\"--version\",description:\"Print rustfmt version and exit\"},{name:\"--manifest-path\",description:\"Specify path to Cargo.toml\",args:{name:\"manifest-path\",generators:(0,r.filepaths)({equals:[\"Cargo.toml\"]})}},{name:\"--message-format\",description:\"Specify message-format\",args:{name:\"message-format\",suggestions:[\"short\",\"json\",\"human\"]}},{name:[\"-p\",\"--package\"],description:\"Specify package to format\",args:{name:\"package\"}}]};a.push(i)}if(n.includes(\"clippy\")){let i={name:\"clippy\",icon:\"\\u{1F4CE}\",description:\"Runs the Clippy linter\",subcommands:[{name:\"--\",description:\"All other arguments are passed to clippy\",options:[{name:[\"-W\",\"--warn\"],description:\"Set lint warnings\",args:{}},{name:[\"-A\",\"--allow\"],description:\"Set lint allowed\",args:{}},{name:[\"-D\",\"--deny\"],description:\"Set lint denied\",args:{}},{name:[\"-F\",\"--forbid\"],description:\"Set lint forbidden\",args:{}}]}],options:[{name:\"--no-deps\",description:\"Run Clippy only on the given crate, without linting the dependencies\"},{name:\"--fix\",description:\"Automatically apply lint suggestions. This flag implies `--no-deps`\"},{name:\"--allow-dirty\",description:\"Allow fix to apply even if the working directory is dirty\",dependsOn:[\"--fix\"]},{name:\"--allow-staged\",description:\"Allow fix to apply even if the working directory has staged changes\",dependsOn:[\"--fix\"]}]};a.push(i)}if(n.includes(\"flamegraph\")){let i={name:\"flamegraph\",icon:\"\\u{1F525}\",description:\"Generates a flamegraph of the current crate\",options:[{name:\"--deterministic\",description:\"Colors are selected such that the color of a function does not change between runs\"},{name:\"--dev\",description:\"Build with the dev profile\"},{name:[\"-i\",\"--inverted\"],description:\"Plot the flame graph up-side-down\"},{name:\"--no-default-features\",description:\"Disable default features\"},{name:\"--open\",description:\"Open the output .svg file with default program\"},{name:\"--reverse\",description:\"Generate stack-reversed flame graph\"},{name:\"--root\",description:\"Run with root privileges (using `sudo`)\"},{name:\"--no-inline\",description:\"Disable inlining for perf script because of performance issues\"}]};a.push(i)}if(n.includes(\"audit\")){let i={name:\"audit\",icon:\"\\u{1F4DA}\",description:\"Runs the cargo audit tool\",options:[{name:[\"-d\",\"--db\"],description:\"Advisory database git repo path\",args:{name:\"DB\",template:\"folders\"}},{name:[\"-D\",\"--deny\"],description:\"Exit with an error on the argument\",args:{isVariadic:!0,suggestions:[{name:\"warnings\",description:\"Warnings (any)\"},{name:\"unmaintained\",description:\"Unmaintained crates\"},{name:\"unsound\",description:\"Unsound Rust code\"},{name:\"yanked\",description:\"Yanked crates\"}]}},{name:[\"-f\",\"--file\"],description:\"Cargo lockfile to inspect\",args:{suggestions:[{name:\"-\",description:\"Stdin\"}],generators:(0,r.filepaths)({equals:[\"Cargo.lock\"]})}},{name:[\"-n\",\"--no-fetch\"],description:\"Do not perform a git fetch on the advisory DB\"},{name:\"--stale\",description:\"Allow stale database\"},{name:\"--target-arch\",description:\"Filter vulnerabilities by CPU\",args:{}},{name:\"--target-os\",description:\"Filter vulnerabilities by OS\",args:{}},{name:[\"-u\",\"--url\"],description:\"URL for advisory database git repo\"},{name:\"--json\",description:\"Output report in JSON format\"},{name:\"--no-local-crates\",description:\"Vulnerability querying does not consider local crates\"}]};a.push(i)}if(n.includes(\"outdated\")){let i={name:\"outdated\",icon:\"\\u{1F4E6}\",description:\"Displays information about project dependency versions\",options:[{name:[\"-a\",\"--aggressive\"],description:\"Ignores channels for latest updates\"},{name:\"--color\",description:\"Output coloring\",args:{name:\"COLOR\",suggestions:[\"always\",\"never\",\"auto\"],default:\"auto\"}},{name:[\"-d\",\"--depth\"],description:\"How deep in the dependency chain to search (Defaults to all dependencies when omitted)\",args:{name:\"DEPTH\"},exclusiveOn:[\"-R\",\"--root-deps-only\"]},{name:[\"-x\",\"--exclude\"],description:\"Exclude a dependency from the output\",isRequired:!0,args:{name:\"DEPENDENCY\",generators:v}},{name:\"--exit-code\",description:\"The exit code to return on new versions found\",args:{name:\"NUM\",suggestions:[\"0\",\"1\"],default:\"0\"}},{name:\"--features\",description:\"Space-separated list of features\",args:{name:\"FEATURES\",generators:l,isVariadic:!0}},{name:\"--format\",description:\"Output formatting\",args:{name:\"FORMAT\",suggestions:[\"json\",\"list\"],default:\"list\"}},{name:[\"-h\",\"--help\"],description:\"Prints help information\"},{name:[\"-i\",\"--ignore\"],description:\"Dependencies to not print in the output\",args:{name:\"DEPENDENCY\",generators:v}},{name:[\"-e\",\"--ignore-external-rel\"],description:\"Ignore relative dependencies external to workspace and check root dependencies only\"},{name:[\"-m\",\"--manifest-path\"],description:\"Path to the Cargo.toml file to use\",args:{name:\"PATH\",generators:(0,r.filepaths)({equals:[\"Cargo.toml\"]})}},{name:[\"-o\",\"--offline\"],description:\"Run without accessing the network\"},{name:[\"-p\",\"--packages\"],description:\"Packages to inspect for updates\",args:{name:\"PACKAGES\",generators:v}},{name:[\"-q\",\"--quiet\"],description:\"Suppresses warnings\"},{name:[\"-r\",\"--root\"],description:\"Package to treat as the root package\",args:{name:\"PACKAGE\",generators:v}},{name:[\"-R\",\"--root-deps-only\"],description:\"Only check root dependencies\",exclusiveOn:[\"-d\",\"--depth\"]},{name:[\"-V\",\"--version\"],description:\"Prints version information\"},{name:[\"-v\",\"--verbose\"],description:\"Use verbose output\"},{name:[\"-w\",\"--workspace\"],description:\"Checks updates for all workspace members rather than only the root package\"}]};a.push(i)}return{name:\"cargo\",subcommands:a}})", "subcommands": [ { "name": "bench", @@ -12,10 +13,7 @@ "isRepeatable": true, "args": { "name": "bin", - "generators": { - "script": "cargo read-manifest", - "postProcess": "function(e){let t=JSON.parse(e);return t.targets?t.targets.filter(({kind:a})=>a.includes(\"bin\")).map(({name:a})=>({name:a})):[]}" - }, + "generatorName": "read_manifest", "isVariadic": true } }, @@ -34,12 +32,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -120,11 +113,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -332,12 +321,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -395,11 +379,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -604,12 +584,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -660,11 +635,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -824,11 +795,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -1245,11 +1212,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -1388,11 +1351,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -1527,12 +1486,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -1583,11 +1537,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -1751,11 +1701,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -2288,10 +2234,7 @@ ], "args": { "name": "crate", - "generators": { - "script": "function(e){return`curl -sfL 'https://crates.io/api/v1/crates?q=${encodeURIComponent(e[e.length-1])}&per_page=60'`}", - "postProcess": "function(e){return JSON.parse(e).crates.map(a=>({name:a.name,description:a.description||\"v\"+a.newest_version,icon:\"\\u{1F4E6}\"}))}" - }, + "template": "filepaths", "debounce": true, "isVariadic": true } @@ -2305,11 +2248,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -2567,11 +2506,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -2980,11 +2915,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -3112,11 +3043,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -3236,11 +3163,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -3364,11 +3287,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -3734,11 +3653,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -3895,12 +3810,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -3966,11 +3876,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -4155,12 +4061,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -4211,11 +4112,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -4435,10 +4332,7 @@ ], "args": { "name": "query", - "generators": { - "script": "function(e){return`curl -sfL 'https://crates.io/api/v1/crates?q=${encodeURIComponent(e[e.length-1])}&per_page=60'`}", - "postProcess": "function(e){return JSON.parse(e).crates.map(a=>({name:a.name,description:a.description||\"v\"+a.newest_version,icon:\"\\u{1F4E6}\"}))}" - }, + "template": "filepaths", "debounce": true, "isVariadic": true, "suggestCurrentToken": true @@ -4476,12 +4370,7 @@ "isRepeatable": true, "args": { "name": "test", - "generators": { - "script": "function(e){let t=e[e.length-1],a=Math.max(t.split(/::?/).length,1),i=t.split(\"::\").pop();return`cargo t -- --list | awk '/: test$/ { print substr($1, 1, length($1) - 1) }' | awk -F \"::\" '{ print \"${i[i.length-1]==\":\"?\":\":\"\"}\"$${a},int( NF / ${a} ) }'`}", - "postProcess": "function(e){return[...new Set(e.split(`\n`))].map(t=>{let[a,n]=t.split(\" \"),i=parseInt(n),o=a.replaceAll(\":\",\"\");return{name:o.length?`${a}${i?\"\":\"::\"}`:\"\",displayName:o}})}", - "trigger": ":", - "getQueryTerm": ":" - }, + "template": "filepaths", "isVariadic": true } }, @@ -4562,11 +4451,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -4736,11 +4621,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -5103,11 +4984,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -5198,11 +5075,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -5318,11 +5191,7 @@ "description": "Path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -5733,11 +5602,7 @@ "description": "Path to the Cargo.toml file to use", "args": { "name": "PATH", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -5859,11 +5724,7 @@ "name": "--", "description": "All other arguments are passed to rustfmt", "args": { - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" }, "options": [ { @@ -5888,10 +5749,7 @@ "name": "--config-path", "description": "Path for the configuration file", "args": { - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -5981,11 +5839,7 @@ "description": "Specify path to Cargo.toml", "args": { "name": "manifest-path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -6136,11 +5990,7 @@ "description": "Stdin" } ], - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let u=m.filter(({name:g=\"\",type:z})=>{if(i!==\"filter\"&&z===\"folder\")return i===\"always\";if(c.has(g)||n&&new RegExp(n.source,n.flags).test(g))return!0;let[,...k]=g.split(\".\");if(k.length>=1){let R=k.length-1,P=k[R];do{if(d.has(P))return!0;R-=1,P=[k[R],P].join(\".\")}while(R>=0)}return!1});return!o&&!s?u:u.map(g=>Object.assign(Object.assign({},g),(g.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { @@ -6348,10 +6198,7 @@ ], "args": { "name": "DEP_ID", - "generators": { - "script": "function(e){return`curl -sfL 'https://crates.io/api/v1/crates?q=${encodeURIComponent(e[e.length-1])}&per_page=60'`}", - "postProcess": "function(e){return JSON.parse(e).crates.map(a=>({name:a.name,description:a.description||\"v\"+a.newest_version,icon:\"\\u{1F4E6}\"}))}" - }, + "template": "filepaths", "debounce": true, "isVariadic": true } @@ -6438,6 +6285,5 @@ "name": "--offline", "description": "Run without accessing the network" } - ], - "generateSpec": "_NuFrRa_(e,t)=>V(void 0,null,function*(){let a=[],n=(yield t(\"cargo --list\")).split(`\n`).filter((i,o)=>o!=0).map(i=>i.trim().split(/\\s+/,1)[0]);if(n.includes(\"fmt\")){let i={name:\"fmt\",icon:\"\\u{1F6E0}\",description:\"This utility formats all bin and lib files of the current crate using rustfmt\",subcommands:[{name:\"--\",description:\"All other arguments are passed to rustfmt\",args:{generators:(0,r.filepaths)({extensions:[\"rs\"]})},options:[{name:\"--check\",description:\"Run in 'check' mode. Exits with 0 if input is formatted correctly. Exits with 1 and prints a diff if formatting is required\"},{name:\"--emit\",description:\"What data to emit and how\",args:{suggestions:[\"files\",\"stdout\"]}},{name:\"--backup\",description:\"Backup any modified files\"},{name:\"--config-path\",description:\"Path for the configuration file\",args:{generators:(0,r.filepaths)({equals:[\"rustfmt.toml\"]})}},{name:\"--edition\",description:\"Rust edition to use\",args:{suggestions:x}},{name:\"--print-config\",description:\"Dumps a default or minimal config to PATH\",args:[{name:\"verbosity\",suggestions:[\"default\",\"minimal\",\"current\"]},{name:\"PATH\",template:\"filepaths\"}]},{name:[\"-l\",\"--files-with-diff\"],description:\"Prints the names of mismatched files that were formatted\"}]}],options:[{name:\"--check\",description:\"Run rustfmt in check mode\"},{name:\"--all\",description:\"Format all packages, and also their local path-based dependencies\"},{name:[\"-h\",\"--help\"],description:\"Print help information\"},{name:[\"-q\",\"--quiet\"],description:\"No output printed to stdout\"},{name:[\"-v\",\"--verbose\"],description:\"Use verbose output\"},{name:\"--version\",description:\"Print rustfmt version and exit\"},{name:\"--manifest-path\",description:\"Specify path to Cargo.toml\",args:{name:\"manifest-path\",generators:(0,r.filepaths)({equals:[\"Cargo.toml\"]})}},{name:\"--message-format\",description:\"Specify message-format\",args:{name:\"message-format\",suggestions:[\"short\",\"json\",\"human\"]}},{name:[\"-p\",\"--package\"],description:\"Specify package to format\",args:{name:\"package\"}}]};a.push(i)}if(n.includes(\"clippy\")){let i={name:\"clippy\",icon:\"\\u{1F4CE}\",description:\"Runs the Clippy linter\",subcommands:[{name:\"--\",description:\"All other arguments are passed to clippy\",options:[{name:[\"-W\",\"--warn\"],description:\"Set lint warnings\",args:{}},{name:[\"-A\",\"--allow\"],description:\"Set lint allowed\",args:{}},{name:[\"-D\",\"--deny\"],description:\"Set lint denied\",args:{}},{name:[\"-F\",\"--forbid\"],description:\"Set lint forbidden\",args:{}}]}],options:[{name:\"--no-deps\",description:\"Run Clippy only on the given crate, without linting the dependencies\"},{name:\"--fix\",description:\"Automatically apply lint suggestions. This flag implies `--no-deps`\"},{name:\"--allow-dirty\",description:\"Allow fix to apply even if the working directory is dirty\",dependsOn:[\"--fix\"]},{name:\"--allow-staged\",description:\"Allow fix to apply even if the working directory has staged changes\",dependsOn:[\"--fix\"]}]};a.push(i)}if(n.includes(\"flamegraph\")){let i={name:\"flamegraph\",icon:\"\\u{1F525}\",description:\"Generates a flamegraph of the current crate\",options:[{name:\"--deterministic\",description:\"Colors are selected such that the color of a function does not change between runs\"},{name:\"--dev\",description:\"Build with the dev profile\"},{name:[\"-i\",\"--inverted\"],description:\"Plot the flame graph up-side-down\"},{name:\"--no-default-features\",description:\"Disable default features\"},{name:\"--open\",description:\"Open the output .svg file with default program\"},{name:\"--reverse\",description:\"Generate stack-reversed flame graph\"},{name:\"--root\",description:\"Run with root privileges (using `sudo`)\"},{name:\"--no-inline\",description:\"Disable inlining for perf script because of performance issues\"}]};a.push(i)}if(n.includes(\"audit\")){let i={name:\"audit\",icon:\"\\u{1F4DA}\",description:\"Runs the cargo audit tool\",options:[{name:[\"-d\",\"--db\"],description:\"Advisory database git repo path\",args:{name:\"DB\",template:\"folders\"}},{name:[\"-D\",\"--deny\"],description:\"Exit with an error on the argument\",args:{isVariadic:!0,suggestions:[{name:\"warnings\",description:\"Warnings (any)\"},{name:\"unmaintained\",description:\"Unmaintained crates\"},{name:\"unsound\",description:\"Unsound Rust code\"},{name:\"yanked\",description:\"Yanked crates\"}]}},{name:[\"-f\",\"--file\"],description:\"Cargo lockfile to inspect\",args:{suggestions:[{name:\"-\",description:\"Stdin\"}],generators:(0,r.filepaths)({equals:[\"Cargo.lock\"]})}},{name:[\"-n\",\"--no-fetch\"],description:\"Do not perform a git fetch on the advisory DB\"},{name:\"--stale\",description:\"Allow stale database\"},{name:\"--target-arch\",description:\"Filter vulnerabilities by CPU\",args:{}},{name:\"--target-os\",description:\"Filter vulnerabilities by OS\",args:{}},{name:[\"-u\",\"--url\"],description:\"URL for advisory database git repo\"},{name:\"--json\",description:\"Output report in JSON format\"},{name:\"--no-local-crates\",description:\"Vulnerability querying does not consider local crates\"}]};a.push(i)}if(n.includes(\"outdated\")){let i={name:\"outdated\",icon:\"\\u{1F4E6}\",description:\"Displays information about project dependency versions\",options:[{name:[\"-a\",\"--aggressive\"],description:\"Ignores channels for latest updates\"},{name:\"--color\",description:\"Output coloring\",args:{name:\"COLOR\",suggestions:[\"always\",\"never\",\"auto\"],default:\"auto\"}},{name:[\"-d\",\"--depth\"],description:\"How deep in the dependency chain to search (Defaults to all dependencies when omitted)\",args:{name:\"DEPTH\"},exclusiveOn:[\"-R\",\"--root-deps-only\"]},{name:[\"-x\",\"--exclude\"],description:\"Exclude a dependency from the output\",isRequired:!0,args:{name:\"DEPENDENCY\",generators:v}},{name:\"--exit-code\",description:\"The exit code to return on new versions found\",args:{name:\"NUM\",suggestions:[\"0\",\"1\"],default:\"0\"}},{name:\"--features\",description:\"Space-separated list of features\",args:{name:\"FEATURES\",generators:l,isVariadic:!0}},{name:\"--format\",description:\"Output formatting\",args:{name:\"FORMAT\",suggestions:[\"json\",\"list\"],default:\"list\"}},{name:[\"-h\",\"--help\"],description:\"Prints help information\"},{name:[\"-i\",\"--ignore\"],description:\"Dependencies to not print in the output\",args:{name:\"DEPENDENCY\",generators:v}},{name:[\"-e\",\"--ignore-external-rel\"],description:\"Ignore relative dependencies external to workspace and check root dependencies only\"},{name:[\"-m\",\"--manifest-path\"],description:\"Path to the Cargo.toml file to use\",args:{name:\"PATH\",generators:(0,r.filepaths)({equals:[\"Cargo.toml\"]})}},{name:[\"-o\",\"--offline\"],description:\"Run without accessing the network\"},{name:[\"-p\",\"--packages\"],description:\"Packages to inspect for updates\",args:{name:\"PACKAGES\",generators:v}},{name:[\"-q\",\"--quiet\"],description:\"Suppresses warnings\"},{name:[\"-r\",\"--root\"],description:\"Package to treat as the root package\",args:{name:\"PACKAGE\",generators:v}},{name:[\"-R\",\"--root-deps-only\"],description:\"Only check root dependencies\",exclusiveOn:[\"-d\",\"--depth\"]},{name:[\"-V\",\"--version\"],description:\"Prints version information\"},{name:[\"-v\",\"--verbose\"],description:\"Use verbose output\"},{name:[\"-w\",\"--workspace\"],description:\"Checks updates for all workspace members rather than only the root package\"}]};a.push(i)}return{name:\"cargo\",subcommands:a}})" + ] } diff --git a/command-signatures/json/checkov.json b/command-signatures/json/checkov.json index 40bb68bb..04a054c2 100644 --- a/command-signatures/json/checkov.json +++ b/command-signatures/json/checkov.json @@ -232,10 +232,7 @@ ], "args": { "name": "BRANCH", - "generators": { - "script": "git branch --no-color", - "postProcess": "_NuFrRa_e=>e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(i=>({name:i.replace(\"*\",\"\").trim(),description:\"Branch\"}))" - } + "generatorName": "git_branch" } }, { diff --git a/command-signatures/json/chown.json b/command-signatures/json/chown.json index ada5bb76..a7af1c8d 100644 --- a/command-signatures/json/chown.json +++ b/command-signatures/json/chown.json @@ -4,11 +4,7 @@ "args": [ { "name": "owner[:group] or :group", - "generators": { - "custom": "function(r,t){return l(this,null,function*(){let i=r.find(e=>e.includes(\":\")),s=r.find(e=>/^-.*n.*/.test(e)),o;return i?o=yield t(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):o=yield t(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),o.split(`\n`).map(e=>e.split(\" \")).map(e=>({name:s?e[1]:e[0],description:i?`Group - ${s?e[0]:`gid: ${e[1]}`}`:`User - ${s?e[0]:`uid: ${e[1]}`}`,icon:i?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" }, { "name": "file/directory", diff --git a/command-signatures/json/cloudflared.json b/command-signatures/json/cloudflared.json index 58943cfe..bd341fe0 100644 --- a/command-signatures/json/cloudflared.json +++ b/command-signatures/json/cloudflared.json @@ -708,10 +708,7 @@ "args": { "name": "value", "description": "Config file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" }, "isRequired": true }, @@ -1242,10 +1239,7 @@ "args": { "name": "value", "description": "Config file in YAML", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -1560,10 +1554,7 @@ "args": { "name": "value", "description": "Config file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -1799,10 +1790,7 @@ "args": { "name": "value", "description": "Config file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -1976,10 +1964,7 @@ "args": { "name": "value", "description": "Config file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -2137,10 +2122,7 @@ "args": { "name": "value", "description": "Config file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -2298,10 +2280,7 @@ "args": { "name": "value", "description": "Config file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -2464,11 +2443,7 @@ "args": { "name": "value", "description": "Config file", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let l=m.filter(({name:d=\"\",type:A})=>{if(i!==\"filter\"&&A===\"folder\")return i===\"always\";if(c.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...g]=d.split(\".\");if(g.length>=1){let h=g.length-1,E=g[h];do{if(s.has(E))return!0;h-=1,E=[g[h],E].join(\".\")}while(h>=0)}return!1});return!r&&!a?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/copilot.json b/command-signatures/json/copilot.json index a3c72382..105ea680 100644 --- a/command-signatures/json/copilot.json +++ b/command-signatures/json/copilot.json @@ -282,10 +282,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -412,10 +409,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -443,10 +437,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -484,10 +475,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -544,10 +532,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -645,10 +630,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -680,10 +662,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -741,10 +720,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -806,10 +782,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -857,10 +830,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -902,10 +872,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -953,10 +920,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1064,10 +1028,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1140,10 +1101,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1191,10 +1149,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1253,10 +1208,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1356,10 +1308,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1391,10 +1340,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1452,10 +1398,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1513,10 +1456,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1576,10 +1516,7 @@ "description": "Optional. Name of the application", "args": { "name": "app", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" }, "exclusiveOn": [ "--default", @@ -1816,10 +1753,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -1893,10 +1827,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2076,10 +2007,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2183,10 +2111,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2257,10 +2182,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2288,10 +2210,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2323,10 +2242,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2368,10 +2284,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2409,10 +2322,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2451,10 +2361,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2682,10 +2589,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2812,10 +2716,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2843,10 +2744,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2884,10 +2782,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -2944,10 +2839,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3045,10 +2937,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3080,10 +2969,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3141,10 +3027,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3206,10 +3089,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3257,10 +3137,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3302,10 +3179,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3353,10 +3227,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3464,10 +3335,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3540,10 +3408,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3591,10 +3456,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3653,10 +3515,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3756,10 +3615,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3791,10 +3647,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3852,10 +3705,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3913,10 +3763,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -3976,10 +3823,7 @@ "description": "Optional. Name of the application", "args": { "name": "app", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" }, "exclusiveOn": [ "--default", @@ -4216,10 +4060,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4293,10 +4134,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4476,10 +4314,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4583,10 +4418,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4658,10 +4490,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4689,10 +4518,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4724,10 +4550,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4769,10 +4592,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { @@ -4810,10 +4630,7 @@ "description": "Name of the application", "args": { "name": "name", - "generators": { - "script": "cat copilot/.workspace", - "postProcess": "_NuFrRa_i=>{if(i.trim()==\"\")return[];let e=[];try{let t=Xt.default.parse(i).application;e.push({name:`${t}`,icon:\"fig://icon?type=aws\"})}catch(t){return console.log(t),[]}return e}" - } + "generatorName": "cat_copilot_workspace" } }, { diff --git a/command-signatures/json/cordova.json b/command-signatures/json/cordova.json index b2d1240f..ee2d253b 100644 --- a/command-signatures/json/cordova.json +++ b/command-signatures/json/cordova.json @@ -145,10 +145,7 @@ "args": { "name": "platform", "description": "Platform name(s) to build. If not specified, all platforms are built", - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" } }, { @@ -200,10 +197,7 @@ "args": { "name": "platform", "isVariadic": true, - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" }, "options": [ { @@ -285,10 +279,7 @@ "args": { "name": "plugin", "isVariadic": true, - "generators": { - "script": "cordova plugin list", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(i=>({name:i,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "plugin_list" } }, { @@ -302,10 +293,7 @@ "description": "Copy files into platform(s) for building", "args": { "name": "platform", - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" } }, { @@ -368,10 +356,7 @@ "args": { "name": "platform", "description": "Platform name(s) to build. If not specified, all platforms are built", - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" } }, { @@ -434,10 +419,7 @@ "args": { "name": "platform", "description": "Platform name(s) to build. If not specified, all platforms are built", - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" } }, { @@ -446,10 +428,7 @@ "args": { "name": "platform", "description": "Platform name(s) to build. If not specified, all platforms are built", - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" } }, { @@ -458,10 +437,7 @@ "args": { "name": "platform", "description": "Platform name(s) to run. If not specified, all platforms are run", - "generators": { - "script": "cat package.json", - "postProcess": "function(t){let i=[];try{if(t.trim()==\"\")return i;let n=JSON.parse(t).cordova.platforms;if(n)for(let r of n)i.push({name:r,description:\"Platform\"})}catch(a){console.log(a)}return i}" - } + "generatorName": "cat_package_json" }, "options": [ { diff --git a/command-signatures/json/curl.json b/command-signatures/json/curl.json index ed60e603..0f05a9ba 100644 --- a/command-signatures/json/curl.json +++ b/command-signatures/json/curl.json @@ -21,9 +21,7 @@ "description": "Client certificate file and password", "args": { "name": "certificate[:password]", - "generators": { - "getQueryTerm": ":" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/dd.json b/command-signatures/json/dd.json index 2495a12b..8abf23be 100644 --- a/command-signatures/json/dd.json +++ b/command-signatures/json/dd.json @@ -114,10 +114,7 @@ "requiresSeparator": true, "args": { "name": "value", - "generators": { - "getQueryTerm": ",", - "custom": "_NuFrRa_()=>o(void 0,null,function*(){return l})" - } + "template": "filepaths" } } ] diff --git a/command-signatures/json/degit.json b/command-signatures/json/degit.json index 126fec2a..862d1da0 100644 --- a/command-signatures/json/degit.json +++ b/command-signatures/json/degit.json @@ -4,10 +4,7 @@ "args": [ { "name": "user/repo", - "generators": { - "trigger": "_NuFrRa_(e,i)=>e.indexOf(\"/\")!==i.indexOf(\"/\")", - "custom": "_NuFrRa_(e,i)=>u(void 0,null,function*(){let r=e[e.length-1];if(r.includes(\":\"))return[];let o=r.slice(0,r.indexOf(\"/\")),l=yield i(`curl -sL 'https://api.github.com/users/${o}/repos'`);return JSON.parse(l).map(n=>{var t;return{name:n.full_name,description:(t=n.description)!=null?t:\"Repository\",priority:n.is_template?51:50,displayName:n.name,icon:\"fig://icon?type=git\"}})})" - } + "template": "filepaths" }, { "name": "location", diff --git a/command-signatures/json/deno.json b/command-signatures/json/deno.json index 52aeda6a..52a52738 100644 --- a/command-signatures/json/deno.json +++ b/command-signatures/json/deno.json @@ -1280,13 +1280,7 @@ { "name": "filter", "isOptional": true, - "generators": { - "scriptTimeout": 12000, - "trigger": ".", - "getQueryTerm": ".", - "script": "_NuFrRa_e=>{let t=new Set([\"--private\",\"--builtin\",\"--unstable\"]),i=e.slice(0,-1).filter(r=>!(r.startsWith(\"-\")&&!t.has(r))&&!r.startsWith(\"$\")&&!r.startsWith(\"(\"));return i.push(\"--json\"),i.join(\" \")}", - "postProcess": "_NuFrRa_(e,t)=>{let i=JSON.parse(e),a=t[t.length-1].split(\".\").slice(0,-1),n=R(i,a),s=ne(n,{showPrivateNodes:t.includes(\"--private\")});return ie(s).map(l=>oe(l))}" - } + "template": "filepaths" } ] }, @@ -2156,10 +2150,7 @@ ], "args": { "name": "name", - "generators": { - "script": "\\find ~/.deno/bin -maxdepth 1 -perm -111 -type f", - "postProcess": "_NuFrRa_e=>e.split(`\n`).filter(t=>!t.endsWith(\"/deno\")).map(t=>({name:t.slice(t.lastIndexOf(\"/\")+1),icon:\"\\u{1F4E6}\",description:t}))" - } + "generatorName": "find_deno_bin_1_f" } }, { @@ -2216,14 +2207,7 @@ "args": { "name": "rules-tags", "isOptional": true, - "generators": { - "script": "deno lint --rules --json", - "getQueryTerm": ",", - "cache": { - "ttl": 86400000 - }, - "postProcess": "_NuFrRa_e=>JSON.parse(e).map(i=>({name:i.code,description:i.docs.slice(0,i.docs.indexOf(`\n\n`)),icon:\"fig://icon?type=string\"}))" - } + "generatorName": "lint" } }, { @@ -2236,14 +2220,7 @@ "args": { "name": "rules-include", "isOptional": true, - "generators": { - "script": "deno lint --rules --json", - "getQueryTerm": ",", - "cache": { - "ttl": 86400000 - }, - "postProcess": "_NuFrRa_e=>JSON.parse(e).map(i=>({name:i.code,description:i.docs.slice(0,i.docs.indexOf(`\n\n`)),icon:\"fig://icon?type=string\"}))" - } + "generatorName": "lint" } }, { @@ -2256,14 +2233,7 @@ "args": { "name": "rules-exclude", "isOptional": true, - "generators": { - "script": "deno lint --rules --json", - "getQueryTerm": ",", - "cache": { - "ttl": 86400000 - }, - "postProcess": "_NuFrRa_e=>JSON.parse(e).map(i=>({name:i.code,description:i.docs.slice(0,i.docs.indexOf(`\n\n`)),icon:\"fig://icon?type=string\"}))" - } + "generatorName": "lint" } }, { @@ -2808,11 +2778,7 @@ "name": "watch", "isVariadic": true, "isOptional": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "getQueryTerm": "," - } + "template": "filepaths" } }, { @@ -2983,12 +2949,7 @@ "args": [ { "name": "task_name", - "generators": { - "cache": { - "strategy": "stale-while-revalidate" - }, - "custom": "_NuFrRa_(e,t)=>y(void 0,null,function*(){let i=yield le(e,t);return i===null?[]:Object.entries(i.tasks||{}).map(([r,a])=>{var s;let n=((s=i.fig)==null?void 0:s[r])||{};return{name:r,displayName:n.displayName,description:n.description||a,icon:n.icon||\"\\u2699\\uFE0F\",priority:n.priority,hidden:n.hidden}})})" - } + "template": "filepaths" }, { "name": "task_args", @@ -3443,13 +3404,7 @@ "args": { "name": "version", "isOptional": true, - "generators": { - "script": "curl -sL 'https://cdn.deno.land/deno/meta/versions.json'", - "cache": { - "ttl": 86400000 - }, - "postProcess": "_NuFrRa_e=>JSON.parse(e).versions.map(i=>({name:i.startsWith(\"v\")?i.slice(1):i}))" - } + "generatorName": "curl_https_cdn_deno_land_deno_meta_versions_json" } }, { diff --git a/command-signatures/json/deployctl.json b/command-signatures/json/deployctl.json index f1dbef16..d6c5ddb5 100644 --- a/command-signatures/json/deployctl.json +++ b/command-signatures/json/deployctl.json @@ -7,10 +7,7 @@ "description": "Deploy a script with static files to Deno Deploy", "args": { "name": "entrypoint", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let a=p.filter(({name:u=\"\",type:P})=>{if(i!==\"filter\"&&P===\"folder\")return i===\"always\";if(l.has(u)||s&&new RegExp(s.source,s.flags).test(u))return!0;let[,...h]=u.split(\".\");if(h.length>=1){let m=h.length-1,x=h[m];do{if(c.has(x))return!0;m-=1,x=[h[m],x].join(\".\")}while(m>=0)}return!1});return!r&&!o?a:a.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?r:o)||{}))}" - } + "template": "filepaths" }, "options": [ { @@ -62,13 +59,7 @@ "args": { "name": "version", "isOptional": true, - "generators": { - "script": "curl -sL 'https://cdn.deno.land/deploy/meta/versions.json'", - "cache": { - "ttl": 86400000 - }, - "postProcess": "_NuFrRa_e=>{let t=JSON.parse(e);return t.versions.map(n=>({name:n,icon:n===t.latest?\"\\u2B50\\uFE0F\":\"\\u{1F995}\"}))}" - } + "generatorName": "curl_https_cdn_deno_land_deploy_meta_versions_json" } } ], diff --git a/command-signatures/json/deta.json b/command-signatures/json/deta.json index e441170d..0faa6834 100644 --- a/command-signatures/json/deta.json +++ b/command-signatures/json/deta.json @@ -94,10 +94,7 @@ "args": { "name": "runtime", "description": "The selected runtime", - "generators": { - "script": "echo node12, node14, python3.7, python3.9", - "postProcess": "_NuFrRa_o=>o.split(\",\").map(i=>({name:i,description:\"Runtime\"}))" - } + "generatorName": "node12_node14_python3_7_python3" } } ] @@ -305,10 +302,7 @@ "args": { "name": "runtime", "description": "New runtime for the micro", - "generators": { - "script": "echo node12, node14, python3.7, python3.9", - "postProcess": "_NuFrRa_o=>o.split(\",\").map(i=>({name:i,description:\"Runtime\"}))" - } + "generatorName": "node12_node14_python3_7_python3" } }, { diff --git a/command-signatures/json/direnv.json b/command-signatures/json/direnv.json index be45e527..9ec35ecc 100644 --- a/command-signatures/json/direnv.json +++ b/command-signatures/json/direnv.json @@ -8,10 +8,7 @@ "isDangerous": true, "args": { "name": "PATH_TO_RC", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_t=>{let n=i=>i.includes(\".envrc\");return t.filter(i=>n(i.name)||i.name.endsWith(\"/\")).map(i=>g(D(g({},i),{priority:n(i.name)&&q}),e))}" - }, + "template": "filepaths", "isOptional": true } }, @@ -21,10 +18,7 @@ "isDangerous": true, "args": { "name": "PATH_TO_RC", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_t=>{let n=i=>i.includes(\".envrc\");return t.filter(i=>n(i.name)||i.name.endsWith(\"/\")).map(i=>g(D(g({},i),{priority:n(i.name)&&q}),e))}" - }, + "template": "filepaths", "isOptional": true } }, @@ -33,10 +27,7 @@ "description": "Opens PATH_TO_RC or the current .envrc into an $EDITOR and allow the file to be loaded afterwards", "args": { "name": "PATH_TO_RC", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_t=>{let n=i=>i.includes(\".envrc\");return t.filter(i=>n(i.name)||i.name.endsWith(\"/\")).map(i=>g(D(g({},i),{priority:n(i.name)&&q}),e))}" - }, + "template": "filepaths", "isOptional": true } }, @@ -175,11 +166,7 @@ }, { "name": "PATH_TO_DOTENV", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let u=h.filter(({name:c=\"\",type:U})=>{if(r!==\"filter\"&&U===\"folder\")return r===\"always\";if(l.has(c)||i&&new RegExp(i.source,i.flags).test(c))return!0;let[,...v]=c.split(\".\");if(v.length>=1){let y=v.length-1,T=v[y];do{if(o.has(T))return!0;y-=1,T=[v[y],T].join(\".\")}while(y>=0)}return!1});return!s&&!a?u:u.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:a)||{}))}" - } + "template": "filepaths" } ] }, diff --git a/command-signatures/json/docker-compose.json b/command-signatures/json/docker-compose.json index 0475ceb9..17371170 100644 --- a/command-signatures/json/docker-compose.json +++ b/command-signatures/json/docker-compose.json @@ -818,10 +818,7 @@ { "args": { "name": "Docker Compose File", - "generators": { - "template": "filepaths", - "filterTemplateName": "filter-docker-files" - } + "template": "filepaths" }, "description": "Specify an alternate compose file", "name": [ diff --git a/command-signatures/json/docker.json b/command-signatures/json/docker.json index e295225e..ab4ca986 100644 --- a/command-signatures/json/docker.json +++ b/command-signatures/json/docker.json @@ -177,11 +177,7 @@ "description": "Set the target build stage to build", "args": { "name": "target build stage", - "generators": { - "trigger": "function(){return!0}", - "script": "function(t){let e,a;return t.includes(\"-f\")?(e=t.indexOf(\"-f\"),a=t[e+1]):t.includes(\"--file\")?(e=t.indexOf(\"--file\"),a=t[e+1]):a=\"$PWD/Dockerfile\",`\\\\grep -iE 'FROM.*AS' \"${a}\"`}", - "postProcess": "function(t){let e=/(?:[aA][sS]\\s+)([\\w:.-]+)/;return t.split(`\n`).map(a=>{let s=e.exec(a);if(s)return{name:s[1]}}).filter(a=>a!==void 0)}" - } + "template": "filepaths" } } ] @@ -1498,11 +1494,7 @@ "description": "Pull an image or a repository from a registry", "args": { "name": "NAME[:TAG|@DIGEST]", - "generators": { - "script": "function(t){return t[t.length-1]===\"\"?\"\":`docker search ${t[t.length-1]} --format '{{ json . }}'`}", - "postProcess": "function(t){return t.split(`\n`).map(e=>JSON.parse(e)).map(e=>({name:`${e.Name}`,icon:\"fig://icon?type=docker\"}))}", - "trigger": "function(){return!0}" - }, + "template": "filepaths", "debounce": true }, "options": [ @@ -2936,11 +2928,7 @@ "description": "Set the target build stage to build", "args": { "name": "target build stage", - "generators": { - "trigger": "function(){return!0}", - "script": "function(t){let e,a;return t.includes(\"-f\")?(e=t.indexOf(\"-f\"),a=t[e+1]):t.includes(\"--file\")?(e=t.indexOf(\"--file\"),a=t[e+1]):a=\"$PWD/Dockerfile\",`\\\\grep -iE 'FROM.*AS' \"${a}\"`}", - "postProcess": "function(t){let e=/(?:[aA][sS]\\s+)([\\w:.-]+)/;return t.split(`\n`).map(a=>{let s=e.exec(a);if(s)return{name:s[1]}}).filter(a=>a!==void 0)}" - } + "template": "filepaths" } } ] @@ -5651,11 +5639,7 @@ "description": "Set the target build stage to build", "args": { "name": "target build stage", - "generators": { - "trigger": "function(){return!0}", - "script": "function(t){let e,a;return t.includes(\"-f\")?(e=t.indexOf(\"-f\"),a=t[e+1]):t.includes(\"--file\")?(e=t.indexOf(\"--file\"),a=t[e+1]):a=\"$PWD/Dockerfile\",`\\\\grep -iE 'FROM.*AS' \"${a}\"`}", - "postProcess": "function(t){let e=/(?:[aA][sS]\\s+)([\\w:.-]+)/;return t.split(`\n`).map(a=>{let s=e.exec(a);if(s)return{name:s[1]}}).filter(a=>a!==void 0)}" - } + "template": "filepaths" } } ] @@ -5853,11 +5837,7 @@ "description": "Pull an image or a repository from a registry", "args": { "name": "NAME[:TAG|@DIGEST]", - "generators": { - "script": "function(t){return t[t.length-1]===\"\"?\"\":`docker search ${t[t.length-1]} --format '{{ json . }}'`}", - "postProcess": "function(t){return t.split(`\n`).map(e=>JSON.parse(e)).map(e=>({name:`${e.Name}`,icon:\"fig://icon?type=docker\"}))}", - "trigger": "function(){return!0}" - }, + "template": "filepaths", "debounce": true }, "options": [ diff --git a/command-signatures/json/dtm.json b/command-signatures/json/dtm.json index 1b8c9b85..09baab82 100644 --- a/command-signatures/json/dtm.json +++ b/command-signatures/json/dtm.json @@ -15,11 +15,7 @@ "args": { "name": "config-file", "default": "config.yaml", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let l=u.filter(({name:c=\"\",type:V})=>{if(t!==\"filter\"&&V===\"folder\")return t===\"always\";if(p.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...g]=c.split(\".\");if(g.length>=1){let h=g.length-1,D=g[h];do{if(a.has(D))return!0;h-=1,D=[g[h],D].join(\".\")}while(h>=0)}return!1});return!s&&!r?l:l.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { @@ -101,11 +97,7 @@ "args": { "name": "config-file", "default": "config.yaml", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let l=u.filter(({name:c=\"\",type:V})=>{if(t!==\"filter\"&&V===\"folder\")return t===\"always\";if(p.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...g]=c.split(\".\");if(g.length>=1){let h=g.length-1,D=g[h];do{if(a.has(D))return!0;h-=1,D=[g[h],D].join(\".\")}while(h>=0)}return!1});return!s&&!r?l:l.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { @@ -145,11 +137,7 @@ "args": { "name": "config-file", "default": "config.yaml", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let l=u.filter(({name:c=\"\",type:V})=>{if(t!==\"filter\"&&V===\"folder\")return t===\"always\";if(p.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...g]=c.split(\".\");if(g.length>=1){let h=g.length-1,D=g[h];do{if(a.has(D))return!0;h-=1,D=[g[h],D].join(\".\")}while(h>=0)}return!1});return!s&&!r?l:l.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { @@ -222,11 +210,7 @@ "args": { "name": "config-file", "default": "config.yaml", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let l=u.filter(({name:c=\"\",type:V})=>{if(t!==\"filter\"&&V===\"folder\")return t===\"always\";if(p.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...g]=c.split(\".\");if(g.length>=1){let h=g.length-1,D=g[h];do{if(a.has(D))return!0;h-=1,D=[g[h],D].join(\".\")}while(h>=0)}return!1});return!s&&!r?l:l.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { @@ -281,10 +265,7 @@ "description": "Specify name with the plugin", "args": { "name": "plugin", - "generators": { - "script": "dtm list plugins", - "postProcess": "_NuFrRa_e=>e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(i=>({name:i.trim(),description:\"Plugin\"}))" - } + "generatorName": "list_plugins" } } ] @@ -359,11 +340,7 @@ "args": { "name": "config-file", "default": "config.yaml", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let l=u.filter(({name:c=\"\",type:V})=>{if(t!==\"filter\"&&V===\"folder\")return t===\"always\";if(p.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...g]=c.split(\".\");if(g.length>=1){let h=g.length-1,D=g[h];do{if(a.has(D))return!0;h-=1,D=[g[h],D].join(\".\")}while(h>=0)}return!1});return!s&&!r?l:l.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/eb.json b/command-signatures/json/eb.json index bf0a372f..29adfd19 100644 --- a/command-signatures/json/eb.json +++ b/command-signatures/json/eb.json @@ -55,10 +55,7 @@ "description": "Deploys the application source bundle from the initialized project directory to the running application", "args": { "name": "environment-name", - "generators": { - "script": "eb list", - "postProcess": "_NuFrRa_t=>t.trim().split(`\n`).map(n=>n.trim()).map(n=>({name:n.startsWith(\"*\")?n.slice(1).trim():n}))" - } + "generatorName": "list" }, "options": [ { @@ -146,10 +143,7 @@ "args": { "name": "environment-name", "description": "The name of the environment to clone", - "generators": { - "script": "eb list", - "postProcess": "_NuFrRa_t=>t.trim().split(`\n`).map(n=>n.trim()).map(n=>({name:n.startsWith(\"*\")?n.slice(1).trim():n}))" - } + "generatorName": "list" }, "options": [ { @@ -210,10 +204,7 @@ "args": { "name": "environment-name", "description": "The name of the environment to open", - "generators": { - "script": "eb list", - "postProcess": "_NuFrRa_t=>t.trim().split(`\n`).map(n=>n.trim()).map(n=>({name:n.startsWith(\"*\")?n.slice(1).trim():n}))" - } + "generatorName": "list" } }, { @@ -242,10 +233,7 @@ "args": { "name": "environment-name", "description": "The name of the environment to print", - "generators": { - "script": "eb list", - "postProcess": "_NuFrRa_t=>t.trim().split(`\n`).map(n=>n.trim()).map(n=>({name:n.startsWith(\"*\")?n.slice(1).trim():n}))" - } + "generatorName": "list" } }, { @@ -254,10 +242,7 @@ "args": { "name": "environment-name", "description": "The name of the environment to connect to", - "generators": { - "script": "eb list", - "postProcess": "_NuFrRa_t=>t.trim().split(`\n`).map(n=>n.trim()).map(n=>({name:n.startsWith(\"*\")?n.slice(1).trim():n}))" - } + "generatorName": "list" }, "options": [ { @@ -313,10 +298,7 @@ "args": { "name": "environment-name", "description": "The name of the environment to use", - "generators": { - "script": "eb list", - "postProcess": "_NuFrRa_t=>t.trim().split(`\n`).map(n=>n.trim()).map(n=>({name:n.startsWith(\"*\")?n.slice(1).trim():n}))" - } + "generatorName": "list" }, "options": [ { diff --git a/command-signatures/json/elixir.json b/command-signatures/json/elixir.json index 30f27c3b..2b92d776 100644 --- a/command-signatures/json/elixir.json +++ b/command-signatures/json/elixir.json @@ -5,10 +5,7 @@ { "name": "file", "description": ".exs file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(f=[])=>{let l=f.filter(({name:c=\"\",type:M})=>{if(i!==\"filter\"&&M===\"folder\")return i===\"always\";if(d.has(c)||a&&new RegExp(a.source,a.flags).test(c))return!0;let[,...g]=c.split(\".\");if(g.length>=1){let m=g.length-1,E=g[m];do{if(o.has(E))return!0;m-=1,E=[g[m],E].join(\".\")}while(m>=0)}return!1});return!s&&!r?l:l.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" }, { "name": "data", diff --git a/command-signatures/json/elm-review.json b/command-signatures/json/elm-review.json index a1b0cc25..bc042c0b 100644 --- a/command-signatures/json/elm-review.json +++ b/command-signatures/json/elm-review.json @@ -182,10 +182,7 @@ "description": "Error reports will be in JSON format", "args": { "name": "json or ndjson", - "generators": { - "script": "echo", - "postProcess": "_NuFrRa_()=>[{name:\"json\",description:\"Prints a single JSON object\"},{name:\"ndjson\",description:\"Print one JSON object per error each on a new line\"}]" - } + "generatorName": "echo" } }, { diff --git a/command-signatures/json/elm.json b/command-signatures/json/elm.json index 3d998e1c..6cf5c408 100644 --- a/command-signatures/json/elm.json +++ b/command-signatures/json/elm.json @@ -58,13 +58,7 @@ "name": "package", "description": "The name of the package to install", "debounce": true, - "generators": { - "script": "curl -sH 'accept-encoding: gzip' https://package.elm-lang.org/search.json | gunzip", - "cache": { - "ttl": 25920000 - }, - "postProcess": "_NuFrRa_o=>JSON.parse(o).map(e=>({name:e.name,description:e.summary}))" - } + "generatorName": "curl_accept_encoding_gzip_https_package_elm_lang_org_search_json" }, "options": [ { diff --git a/command-signatures/json/esbuild.json b/command-signatures/json/esbuild.json index 7212e7ee..0be3a385 100644 --- a/command-signatures/json/esbuild.json +++ b/command-signatures/json/esbuild.json @@ -56,11 +56,7 @@ "requiresSeparator": ":", "args": { "name": "loaders", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" }, "priority": 51 }, @@ -124,11 +120,7 @@ "requiresSeparator": "=", "args": { "name": "target", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" }, "priority": 51 }, @@ -168,11 +160,7 @@ "requiresSeparator": ":", "args": { "name": "ext=text[,ext=text...]", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" } }, { @@ -230,11 +218,7 @@ "requiresSeparator": ":", "args": { "name": "ext=text", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" } }, { @@ -349,11 +333,7 @@ "requiresSeparator": ":", "args": { "name": "identifier:level", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" } }, { @@ -423,11 +403,7 @@ "requiresSeparator": ":", "args": { "name": "ext=new", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" } }, { @@ -474,11 +450,7 @@ "requiresSeparator": "=", "args": { "name": "extensions", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" } }, { @@ -544,11 +516,7 @@ "requiresSeparator": ":", "args": { "name": "syntax=status", - "generators": { - "trigger": "_NuFrRa_(s,o)=>{let u=v(t,r,s),p=v(t,r,o);return u!==p}", - "getQueryTerm": "_NuFrRa_s=>{let o=v(t,r,s);return s.slice(o+1)}", - "custom": "_NuFrRa_(...s)=>x(this,void 0,void 0,function*(){let[o]=s,u=o[o.length-1],p=v(t,r,u),l=p===-1||u.slice(p,p+t.length)!==t;return E(l?a:i,n,s)})" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/eslint.json b/command-signatures/json/eslint.json index 7173bacd..57af6dac 100644 --- a/command-signatures/json/eslint.json +++ b/command-signatures/json/eslint.json @@ -22,11 +22,7 @@ "name": "--env", "description": "Specify environments", "args": { - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_t=>l(void 0,null,function*(){let e=[\"browser\",\"node\",\"commonjs\",\"shared-node-browser\",\"es6\",\"ecmaVersion\",\"es2017\",\"es2020\",\"es2021\",\"worker\",\"amd\",\"mocha\",\"jasmine\",\"jest\",\"phantomjs\",\"protractor\",\"qunit\",\"jquery\",\"prototypejs\",\"shelljs\",\"meteor\",\"mongo\",\"applescript\",\"nashorn\",\"servicerworker\",\"atomtest\",\"embertest\",\"webextensions\",\"greasemonkey\"],n=[t[t.length-1]][0];return e.filter(o=>!n.split(\",\").includes(o)).map(o=>({name:o}))})" - } + "template": "filepaths" } }, { @@ -78,10 +74,7 @@ "description": "Specify plugins", "args": { "name": "Plugin", - "generators": { - "script": "{ ls node_modules ; ls $(npm root -g) ; ls $(yarn global dir)/node_modules/ ; } | cat", - "postProcess": "_NuFrRa_t=>t.split(`\n`).filter(e=>e.startsWith(\"eslint-plugin\")).map(e=>({name:e.split(\" \")[0].slice(14)}))" - } + "generatorName": "ls_node_modules_root_global" } }, { diff --git a/command-signatures/json/expo-cli.json b/command-signatures/json/expo-cli.json index cafc73e7..a1995113 100644 --- a/command-signatures/json/expo-cli.json +++ b/command-signatures/json/expo-cli.json @@ -1400,10 +1400,7 @@ "name": "--max-workers", "description": "Maximum number of tasks to allow Metro to spawn", "args": { - "generators": { - "script": "sysctl -n hw.ncpu", - "postProcess": "_NuFrRa_t=>{let e=Number(t);return Array.from({length:e},(o,n)=>{let i=e-n;return{priority:i,name:String(i)}})}" - }, + "generatorName": "sysctl_hw_ncpu", "name": "Number of workers" } }, @@ -1851,10 +1848,7 @@ "description": "Install a module or other package to a project", "priority": 64, "args": { - "generators": { - "script": "_NuFrRa_script(t){return t[t.length-1]===\"\"?\"\":`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?q=${t[t.length-1]}&size=20\"`}", - "postProcess": "_NuFrRa_postProcess(t){try{return JSON.parse(t).results.map(o=>({name:o.package.name,description:o.package.description}))}catch(e){return[]}}" - }, + "template": "filepaths", "isOptional": true, "isVariadic": true, "name": "packages", @@ -1993,10 +1987,7 @@ "name": "--max-workers", "description": "Maximum number of tasks to allow Metro to spawn", "args": { - "generators": { - "script": "sysctl -n hw.ncpu", - "postProcess": "_NuFrRa_t=>{let e=Number(t);return Array.from({length:e},(o,n)=>{let i=e-n;return{priority:i,name:String(i)}})}" - }, + "generatorName": "sysctl_hw_ncpu", "name": "Number of workers" } }, @@ -2594,10 +2585,7 @@ ], "description": "Device name or UDID to build the app on", "args": { - "generators": { - "script": "xcrun xctrace list devices", - "postProcess": "_NuFrRa_t=>t.split(`\n`).filter(e=>!e.match(/^=/)).filter(Boolean).map(e=>e.split(/(.*?) (\\(([0-9.]+)\\) )?\\(([0-9A-F-]+)\\)/i)).filter(e=>!!(e!=null&&e[3])).map(([,e,,o,n])=>({displayName:`${e.trim()} (${o})`,name:n}))" - }, + "generatorName": "xcrun_xctrace_list_devices", "name": "device" } }, @@ -2615,10 +2603,7 @@ "name": "--scheme", "description": "Scheme to build", "args": { - "generators": { - "script": "xcodebuild -project ios/*.xcodeproj -list -json", - "postProcess": "_NuFrRa_t=>JSON.parse(t).project.schemes.map(e=>({name:e}))" - }, + "generatorName": "xcodebuild_ios_xcodeproj", "name": "scheme", "isOptional": true } @@ -2627,10 +2612,7 @@ "name": "--configuration", "description": "Xcode configuration to use. Debug or Release. Default: Debug", "args": { - "generators": { - "script": "xcodebuild -project ios/*.xcodeproj -list -json", - "postProcess": "_NuFrRa_t=>JSON.parse(t).project.configurations.map(e=>({name:e}))" - }, + "generatorName": "xcodebuild_ios_xcodeproj", "name": "configuration" } }, @@ -2875,10 +2857,7 @@ "name": "--max-workers", "description": "Maximum number of tasks to allow Metro to spawn", "args": { - "generators": { - "script": "sysctl -n hw.ncpu", - "postProcess": "_NuFrRa_t=>{let e=Number(t);return Array.from({length:e},(o,n)=>{let i=e-n;return{priority:i,name:String(i)}})}" - }, + "generatorName": "sysctl_hw_ncpu", "name": "Number of workers" } }, diff --git a/command-signatures/json/expo.json b/command-signatures/json/expo.json index b467cb5b..5b488fde 100644 --- a/command-signatures/json/expo.json +++ b/command-signatures/json/expo.json @@ -1400,10 +1400,7 @@ "name": "--max-workers", "description": "Maximum number of tasks to allow Metro to spawn", "args": { - "generators": { - "script": "sysctl -n hw.ncpu", - "postProcess": "_NuFrRa_t=>{let e=Number(t);return Array.from({length:e},(o,n)=>{let i=e-n;return{priority:i,name:String(i)}})}" - }, + "generatorName": "sysctl_hw_ncpu", "name": "Number of workers" } }, @@ -1851,10 +1848,7 @@ "description": "Install a module or other package to a project", "priority": 64, "args": { - "generators": { - "script": "_NuFrRa_script(t){return t[t.length-1]===\"\"?\"\":`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?q=${t[t.length-1]}&size=20\"`}", - "postProcess": "_NuFrRa_postProcess(t){try{return JSON.parse(t).results.map(o=>({name:o.package.name,description:o.package.description}))}catch(e){return[]}}" - }, + "template": "filepaths", "isOptional": true, "isVariadic": true, "name": "packages", @@ -1993,10 +1987,7 @@ "name": "--max-workers", "description": "Maximum number of tasks to allow Metro to spawn", "args": { - "generators": { - "script": "sysctl -n hw.ncpu", - "postProcess": "_NuFrRa_t=>{let e=Number(t);return Array.from({length:e},(o,n)=>{let i=e-n;return{priority:i,name:String(i)}})}" - }, + "generatorName": "sysctl_hw_ncpu", "name": "Number of workers" } }, @@ -2594,10 +2585,7 @@ ], "description": "Device name or UDID to build the app on", "args": { - "generators": { - "script": "xcrun xctrace list devices", - "postProcess": "_NuFrRa_t=>t.split(`\n`).filter(e=>!e.match(/^=/)).filter(Boolean).map(e=>e.split(/(.*?) (\\(([0-9.]+)\\) )?\\(([0-9A-F-]+)\\)/i)).filter(e=>!!(e!=null&&e[3])).map(([,e,,o,n])=>({displayName:`${e.trim()} (${o})`,name:n}))" - }, + "generatorName": "xcrun_xctrace_list_devices", "name": "device" } }, @@ -2615,10 +2603,7 @@ "name": "--scheme", "description": "Scheme to build", "args": { - "generators": { - "script": "xcodebuild -project ios/*.xcodeproj -list -json", - "postProcess": "_NuFrRa_t=>JSON.parse(t).project.schemes.map(e=>({name:e}))" - }, + "generatorName": "xcodebuild_ios_xcodeproj", "name": "scheme", "isOptional": true } @@ -2627,10 +2612,7 @@ "name": "--configuration", "description": "Xcode configuration to use. Debug or Release. Default: Debug", "args": { - "generators": { - "script": "xcodebuild -project ios/*.xcodeproj -list -json", - "postProcess": "_NuFrRa_t=>JSON.parse(t).project.configurations.map(e=>({name:e}))" - }, + "generatorName": "xcodebuild_ios_xcodeproj", "name": "configuration" } }, @@ -2875,10 +2857,7 @@ "name": "--max-workers", "description": "Maximum number of tasks to allow Metro to spawn", "args": { - "generators": { - "script": "sysctl -n hw.ncpu", - "postProcess": "_NuFrRa_t=>{let e=Number(t);return Array.from({length:e},(o,n)=>{let i=e-n;return{priority:i,name:String(i)}})}" - }, + "generatorName": "sysctl_hw_ncpu", "name": "Number of workers" } }, diff --git a/command-signatures/json/ffmpeg.json b/command-signatures/json/ffmpeg.json index 35131ccb..8945edaf 100644 --- a/command-signatures/json/ffmpeg.json +++ b/command-signatures/json/ffmpeg.json @@ -121,10 +121,7 @@ "description": "List sources of the input device", "args": { "name": "device", - "generators": { - "script": "ffmpeg -devices", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions_devices" } }, { @@ -132,10 +129,7 @@ "description": "List sinks of the output device", "args": { "name": "device", - "generators": { - "script": "ffmpeg -devices", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions_devices" } }, { @@ -425,10 +419,7 @@ "description": "Set VAAPI hardware device (DRM path or X11 display name)", "args": { "name": "device", - "generators": { - "script": "ffmpeg -devices", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions_devices" } }, { @@ -443,10 +434,7 @@ "description": "Set hardware device used when filtering", "args": { "name": "device", - "generators": { - "script": "ffmpeg -devices", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions_devices" } }, { @@ -461,10 +449,7 @@ "description": "Codec name", "args": { "name": "codec", - "generators": { - "script": "ffmpeg -codecs", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions" } }, { @@ -472,10 +457,7 @@ "description": "Codec name", "args": { "name": "codec", - "generators": { - "script": "ffmpeg -codecs", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions" } }, { @@ -777,10 +759,7 @@ "description": "Force data codec ('copy' to copy stream)", "args": { "name": "codec", - "generators": { - "script": "ffmpeg -codecs", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions" } }, { @@ -820,10 +799,7 @@ "description": "Force video codec ('copy' to copy stream)", "args": { "name": "codec", - "generators": { - "script": "ffmpeg -codecs", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions" } }, { @@ -1009,10 +985,7 @@ "description": "Force audio codec ('copy' to copy stream)", "args": { "name": "codec", - "generators": { - "script": "ffmpeg -codecs", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions" } }, { @@ -1071,10 +1044,7 @@ "description": "Force subtitle codec ('copy' to copy stream)", "args": { "name": "codec", - "generators": { - "script": "ffmpeg -codecs", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(Boolean).map(e=>e.split(\" \").filter(Boolean)[1]).filter(Boolean).filter(e=>e!==\"=\").map(e=>({name:e}))" - } + "generatorName": "completions" } }, { diff --git a/command-signatures/json/fig-teams.json b/command-signatures/json/fig-teams.json index 5cb72809..2ccecfce 100644 --- a/command-signatures/json/fig-teams.json +++ b/command-signatures/json/fig-teams.json @@ -34,10 +34,7 @@ "description": "Team to use", "args": { "name": "teamname", - "generators": { - "script": "npx -y fig-teams@latest teams ls --json", - "postProcess": "_NuFrRa_a=>{try{return JSON.parse(a).map(t=>({name:t}))}catch(e){return[]}}" - } + "generatorName": "npx_fig_teams_latest_teams" } }, { @@ -58,19 +55,13 @@ "description": "Team to use", "args": { "name": "teamname", - "generators": { - "script": "npx -y fig-teams@latest teams ls --json", - "postProcess": "_NuFrRa_a=>{try{return JSON.parse(a).map(t=>({name:t}))}catch(e){return[]}}" - } + "generatorName": "npx_fig_teams_latest_teams" } } ], "args": { "name": "email", - "generators": { - "script": "_NuFrRa_a=>{let e=a.findIndex(t=>t===\"-t\"||t===\"--team\");return e!==-1&&a[e+1]!==void 0?`npx -y fig-teams@latest users get -t ${a[e+1]} --json`:\"\"}", - "postProcess": "_NuFrRa_a=>{try{return JSON.parse(a).map(({email:t})=>({name:t,icon:\"fig://icon?type=invite\"}))}catch(e){return[]}}" - } + "template": "filepaths" } }, { @@ -85,19 +76,13 @@ "description": "Team to use", "args": { "name": "teamname", - "generators": { - "script": "npx -y fig-teams@latest teams ls --json", - "postProcess": "_NuFrRa_a=>{try{return JSON.parse(a).map(t=>({name:t}))}catch(e){return[]}}" - } + "generatorName": "npx_fig_teams_latest_teams" } } ], "args": { "name": "email", - "generators": { - "script": "_NuFrRa_a=>{let e=a.findIndex(t=>t===\"-t\"||t===\"--team\");return e!==-1&&a[e+1]!==void 0?`npx -y fig-teams@latest users get -t ${a[e+1]} --json`:\"\"}", - "postProcess": "_NuFrRa_a=>{try{return JSON.parse(a).map(({email:t})=>({name:t,icon:\"fig://icon?type=invite\"}))}catch(e){return[]}}" - } + "template": "filepaths" } } ] diff --git a/command-signatures/json/file.json b/command-signatures/json/file.json index 749883f7..b92358ee 100644 --- a/command-signatures/json/file.json +++ b/command-signatures/json/file.json @@ -189,11 +189,7 @@ "isRepeatable": true, "args": { "name": "name=value", - "generators": { - "trigger": "_NuFrRa_(n,o)=>n.indexOf(e)!==o.indexOf(e)", - "getQueryTerm": "_NuFrRa_n=>n.slice(n.indexOf(e)+1)", - "custom": "_NuFrRa_(...n)=>b(this,void 0,void 0,function*(){let[o]=n,r=!o[o.length-1].includes(e);return O(r?t:i,s,n)})" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/fisher.json b/command-signatures/json/fisher.json index e8163a9b..13c9ae8d 100644 --- a/command-signatures/json/fisher.json +++ b/command-signatures/json/fisher.json @@ -69,10 +69,7 @@ "description": "The plugin you want to remove", "isDangerous": true, "isVariadic": true, - "generators": { - "script": "fish -c 'fisher list'", - "postProcess": "_NuFrRa_i=>i?i.substring(19).split(`\n`).map(n=>({name:n.trim(),icon:\"fig://icon?type=package\",description:\"Plugin\"})):[]" - } + "generatorName": "fish_fisher_list" } }, { @@ -82,10 +79,7 @@ "name": "installed plugins", "description": "The plugin you want to update", "isVariadic": true, - "generators": { - "script": "fish -c 'fisher list'", - "postProcess": "_NuFrRa_i=>i?i.substring(19).split(`\n`).map(n=>({name:n.trim(),icon:\"fig://icon?type=package\",description:\"Plugin\"})):[]" - } + "generatorName": "fish_fisher_list" } }, { diff --git a/command-signatures/json/flutter.json b/command-signatures/json/flutter.json index 811251b9..ac47bcce 100644 --- a/command-signatures/json/flutter.json +++ b/command-signatures/json/flutter.json @@ -403,11 +403,7 @@ "description": "The main entry-point file of the application, as run on the device.\n If the --target option is omitted, but a file name is provided on the command line, then that is used instead.\n(defaults to \"lib/main.dart\")", "args": { "name": "path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateName": "filter-dart-files" - } + "template": "filepaths" } } ], diff --git a/command-signatures/json/fly.json b/command-signatures/json/fly.json index 9b48fdbf..a6fe6b43 100644 --- a/command-signatures/json/fly.json +++ b/command-signatures/json/fly.json @@ -65,10 +65,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } } ] @@ -102,10 +99,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -129,10 +123,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -160,10 +151,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -265,10 +253,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -297,10 +282,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -329,10 +311,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -361,10 +340,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -393,10 +369,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -423,10 +396,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -459,10 +429,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -499,10 +466,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -531,10 +495,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -563,10 +524,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -598,10 +556,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -637,10 +592,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -667,10 +619,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -740,10 +689,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -831,10 +777,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -863,10 +806,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -895,10 +835,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -927,10 +864,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -957,10 +891,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1007,10 +938,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } } ] @@ -1038,10 +966,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1068,10 +993,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1100,10 +1022,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1241,10 +1160,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1266,10 +1182,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -1325,10 +1238,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1358,10 +1268,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1411,10 +1318,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1449,10 +1353,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1480,10 +1381,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1524,10 +1422,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1571,10 +1466,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1610,10 +1502,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1649,10 +1538,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1681,10 +1567,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1713,10 +1596,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1743,10 +1623,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1809,10 +1686,7 @@ "description": "The organization that will own the app", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -1862,10 +1736,7 @@ "description": "Show only apps in this organisation", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -1906,10 +1777,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -1965,10 +1833,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2007,10 +1872,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -2037,10 +1899,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2068,10 +1927,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2109,10 +1965,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2147,10 +2000,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2277,10 +2127,7 @@ "description": "The organization that will own the app", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -2337,10 +2184,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2368,10 +2212,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2399,10 +2240,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2450,10 +2288,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2481,10 +2316,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -2508,10 +2340,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2592,10 +2421,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2639,10 +2465,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -2695,10 +2518,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2755,10 +2575,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2883,10 +2700,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2917,10 +2731,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -2964,10 +2775,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3000,10 +2808,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3025,10 +2830,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -3056,10 +2858,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3095,10 +2894,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3127,10 +2923,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3159,10 +2952,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3198,10 +2988,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3235,10 +3022,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3267,10 +3051,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3314,10 +3095,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3354,10 +3132,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3393,10 +3168,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3425,10 +3197,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3470,10 +3239,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3506,10 +3272,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3542,10 +3305,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3574,10 +3334,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3610,10 +3367,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3644,10 +3398,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3680,10 +3431,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3802,10 +3550,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3835,10 +3580,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3905,10 +3647,7 @@ "description": "The organization that will own the app", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(p=>p.trim()),[s,o,r]=n;return{name:s,description:`${o}`}})" - } + "generatorName": "flyctl_list_orgs" } }, { @@ -3958,10 +3697,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -3990,10 +3726,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -4022,10 +3755,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -4063,10 +3793,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { @@ -4136,10 +3863,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(a=>{let n=a.split(\"|\").map(f=>f.trim()),[s,o,r,p]=n;return{name:s,description:`Organization: ${r}`,icon:o==\"running\"?\"\\u{1F7E2}\":o==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "flyctl_list_apps" } }, { diff --git a/command-signatures/json/flyctl.json b/command-signatures/json/flyctl.json index 42c09386..fdbb9c0d 100644 --- a/command-signatures/json/flyctl.json +++ b/command-signatures/json/flyctl.json @@ -65,10 +65,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } } ] @@ -102,10 +99,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -129,10 +123,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -160,10 +151,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -265,10 +253,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -297,10 +282,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -329,10 +311,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -361,10 +340,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -393,10 +369,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -423,10 +396,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -459,10 +429,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -499,10 +466,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -531,10 +495,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -563,10 +524,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -598,10 +556,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -637,10 +592,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -667,10 +619,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -740,10 +689,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -831,10 +777,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -863,10 +806,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -895,10 +835,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -927,10 +864,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -957,10 +891,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1007,10 +938,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } } ] @@ -1038,10 +966,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1068,10 +993,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1100,10 +1022,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1241,10 +1160,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1266,10 +1182,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -1325,10 +1238,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1358,10 +1268,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1411,10 +1318,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1449,10 +1353,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1480,10 +1381,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1524,10 +1422,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1571,10 +1466,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1610,10 +1502,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1649,10 +1538,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1681,10 +1567,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1713,10 +1596,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1743,10 +1623,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1809,10 +1686,7 @@ "description": "The organization that will own the app", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -1862,10 +1736,7 @@ "description": "Show only apps in this organisation", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -1906,10 +1777,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -1965,10 +1833,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2007,10 +1872,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -2037,10 +1899,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2068,10 +1927,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2109,10 +1965,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2147,10 +2000,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2277,10 +2127,7 @@ "description": "The organization that will own the app", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -2337,10 +2184,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2368,10 +2212,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2399,10 +2240,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2450,10 +2288,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2481,10 +2316,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -2508,10 +2340,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2592,10 +2421,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2639,10 +2465,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -2695,10 +2518,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2755,10 +2575,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2883,10 +2700,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2917,10 +2731,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -2964,10 +2775,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3000,10 +2808,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3025,10 +2830,7 @@ "description": "The organization to operate on", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -3056,10 +2858,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3095,10 +2894,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3127,10 +2923,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3159,10 +2952,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3198,10 +2988,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3235,10 +3022,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3267,10 +3051,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3314,10 +3095,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3354,10 +3132,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3393,10 +3168,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3425,10 +3197,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3470,10 +3239,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3506,10 +3272,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3542,10 +3305,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3574,10 +3334,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3610,10 +3367,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3644,10 +3398,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3680,10 +3431,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3802,10 +3550,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3835,10 +3580,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3905,10 +3647,7 @@ "description": "The organization that will own the app", "args": { "name": "org", - "generators": { - "script": "flyctl list orgs", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(p=>p.trim()),[s,n,r]=o;return{name:s,description:`${n}`}})" - } + "generatorName": "list_orgs" } }, { @@ -3958,10 +3697,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -3990,10 +3726,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -4022,10 +3755,7 @@ "description": "App name to operate on", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -4063,10 +3793,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { @@ -4136,10 +3863,7 @@ "description": "Application name", "args": { "name": "app", - "generators": { - "script": "flyctl list apps", - "postProcess": "_NuFrRa_i=>i.split(`\n`).slice(2).map(t=>{let o=t.split(\"|\").map(c=>c.trim()),[s,n,r,p]=o;return{name:s,description:`Organization: ${r}`,icon:n==\"running\"?\"\\u{1F7E2}\":n==\"pending\"?\"\\u{1F7E1}\":\"\\u{1F534}\"}})" - } + "generatorName": "list_apps" } }, { diff --git a/command-signatures/json/fnm.json b/command-signatures/json/fnm.json index a3991331..2cbff0b6 100644 --- a/command-signatures/json/fnm.json +++ b/command-signatures/json/fnm.json @@ -71,13 +71,7 @@ "name": "version", "description": "A version string. Can be a partial semver or a LTS version name by the format lts/NAME", "isOptional": true, - "generators": { - "script": "fnm ls-remote", - "postProcess": "function(s){let n=s.split(`\n`).reverse().filter(Boolean).map(F),i=n.find(e=>e.major%2===0).major,r=new Map,p=n.map(e=>{let o=r.get(e.major);return(!o||o.minor{if(e.major===i)return!0;let o=e.original===r.get(e.major).original;return(e.major%2===0||e.major===i-1||e.major===i+1)&&o});return y([...p,...n],(e,o)=>e.original===o.original).map(e=>e.ltsName&&r.get(e.major).original===e.original?{name:`lts/${e.ltsName}`,displayName:e.original,description:`Node.js ${e.original}`}:{name:e.original.split(\" \").shift(),description:`Node.js ${e.original}`})}", - "cache": { - "ttl": 86400 - } - } + "generatorName": "ls_remote" }, "options": [ { @@ -154,10 +148,7 @@ "name": "version", "description": "A version string. Can be a partial semver or a LTS version name by the format lts/NAME", "isOptional": true, - "generators": { - "script": "fnm ls", - "postProcess": "function(s){return s.split(`\n`).reverse().map(n=>({name:n.slice(2),description:`Node.js ${n.slice(2)}`}))}" - } + "generatorName": "ls" }, "options": [ { @@ -233,10 +224,7 @@ "name": "version", "description": "A version string. Can be a partial semver or a LTS version name by the format lts/NAME", "isOptional": true, - "generators": { - "script": "fnm ls", - "postProcess": "function(s){return s.split(`\n`).reverse().map(n=>({name:n.slice(2),description:`Node.js ${n.slice(2)}`}))}" - } + "generatorName": "ls" }, "options": [ { @@ -607,10 +595,7 @@ "name": "version", "description": "A version string. Can be a partial semver or a LTS version name by the format lts/NAME", "isOptional": true, - "generators": { - "script": "fnm ls", - "postProcess": "function(s){return s.split(`\n`).reverse().map(n=>({name:n.slice(2),description:`Node.js ${n.slice(2)}`}))}" - } + "generatorName": "ls" }, { "name": "name", @@ -837,10 +822,7 @@ "name": "version", "description": "A version string. Can be a partial semver or a LTS version name by the format lts/NAME", "isOptional": true, - "generators": { - "script": "fnm ls", - "postProcess": "function(s){return s.split(`\n`).reverse().map(n=>({name:n.slice(2),description:`Node.js ${n.slice(2)}`}))}" - } + "generatorName": "ls" }, "options": [ { diff --git a/command-signatures/json/fvm.json b/command-signatures/json/fvm.json index 40beda06..3ece2fb3 100644 --- a/command-signatures/json/fvm.json +++ b/command-signatures/json/fvm.json @@ -111,10 +111,7 @@ "priority": 98 } ], - "generators": { - "script": "fvm releases", - "postProcess": "function(t){let s=t.match(i);return[...new Set(s)].map(o=>({name:o})).reverse()}" - } + "generatorName": "releases" }, "options": [ { diff --git a/command-signatures/json/gh.json b/command-signatures/json/gh.json index 74a0eac5..6d69e7f4 100644 --- a/command-signatures/json/gh.json +++ b/command-signatures/json/gh.json @@ -5,10 +5,7 @@ "name": "alias", "description": "Custom user defined gh alias", "isOptional": true, - "generators": { - "script": "gh alias list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(i=>{let[r,s]=i.split(\":\");return{name:r.trim(),content:s.trim()}}).map(({name:i,content:r})=>({name:i,description:`Alias for '${r}'`,icon:\"fig://icon?type=commandkey\"}))" - } + "generatorName": "list_alias" }, "subcommands": [ { @@ -26,10 +23,7 @@ "description": "Delete an alias", "args": { "name": "alias", - "generators": { - "script": "gh alias list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(i=>{let[r,s]=i.split(\":\");return{name:r.trim(),content:s.trim()}}).map(({name:i,content:r})=>({name:i,description:`Alias for '${r}'`,icon:\"fig://icon?type=commandkey\"}))" - } + "generatorName": "list_alias" }, "options": [ { @@ -271,10 +265,7 @@ "description": "Open the repository in the browser", "args": { "name": "[pr | issue | path[:line]", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - }, + "generatorName": "list_pr", "suggestCurrentToken": true }, "options": [ @@ -290,10 +281,7 @@ "description": "Select another branch by passing in the branch name", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -r --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_n=>{let o=h(n);return o.startsWith(\"fatal:\")?[]:o.split(`\n`).map(i=>{let r=i.trim().replace(/\\w+\\//,\"\"),s=i.match(/\\S+/g);if(s.length>1){if(s[0]===\"*\")return i.includes(\"HEAD detached\")?{}:{name:i.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};s[0]===\"+\"&&(r=i.replace(\"+\",\"\").trim())}return{name:r,description:\"Branch\",icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -1412,10 +1400,7 @@ "description": "Check out a pull request in git", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1429,10 +1414,7 @@ "description": "Show CI status for a single pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1449,10 +1431,7 @@ "description": "Close a pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1469,10 +1448,7 @@ "description": "Edit a pull request. Without an argument, the pull request that belongs to the current branch is selected", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1602,10 +1578,7 @@ "description": "Create a new pr comment", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1657,10 +1630,7 @@ "description": "The branch into which you want your code merged", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -r --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_n=>{let o=h(n);return o.startsWith(\"fatal:\")?[]:o.split(`\n`).map(i=>{let r=i.trim().replace(/\\w+\\//,\"\"),s=i.match(/\\S+/g);if(s.length>1){if(s[0]===\"*\")return i.includes(\"HEAD detached\")?{}:{name:i.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};s[0]===\"+\"&&(r=i.replace(\"+\",\"\").trim())}return{name:r,description:\"Branch\",icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -1773,10 +1743,7 @@ "description": "View changes in a pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1859,10 +1826,7 @@ "description": "Merge a pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -1960,10 +1924,7 @@ "description": "Mark a pull request as ready for review", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" } }, { @@ -1971,10 +1932,7 @@ "description": "Reopen a pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" } }, { @@ -1982,10 +1940,7 @@ "description": "Add a review to a pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -2030,10 +1985,7 @@ "description": "View a pull request", "args": { "name": "number | url | branch", - "generators": { - "script": "gh pr list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).map(o=>{let{id:i,name:r,branch:s,status:p}=o.match(new RegExp(\"^(?[\\\\d]+)\\\\t(?.+)\\\\t(?.*)\\\\t(?OPEN|DRAFT)$\")).groups;return{name:i,displayName:r,description:`#${i} | ${s}`,icon:p===\"OPEN\"?\"\\u2705\":\"\\u2611\\uFE0F\"}})" - } + "generatorName": "list_pr" }, "options": [ { @@ -2068,10 +2020,7 @@ "isDangerous": true, "args": { "name": "repository", - "generators": { - "script": "gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'", - "postProcess": "_NuFrRa_n=>{if(n){let o=`[${n.replace(/(?:\\r\\n|\\r|\\n)/g,\",\")}]`;try{return JSON.parse(o).map(u)}catch(i){return[]}}return[]}" - }, + "generatorName": "api_graphql_string_viewer", "isOptional": true }, "options": [ @@ -2094,16 +2043,8 @@ "args": [ { "name": "repository", - "generators": [ - { - "script": "gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'", - "postProcess": "_NuFrRa_n=>{if(n){let o=`[${n.replace(/(?:\\r\\n|\\r|\\n)/g,\",\")}]`;try{return JSON.parse(o).map(u)}catch(i){return[]}}return[]}" - }, - { - "trigger": "/", - "custom": "_NuFrRa_(n,o)=>d(void 0,null,function*(){let i=n.pop();if(!i)return[];let r=i.split(\"/\");if(r.length===0)return[];let s=r.shift();if(!s)return[];let p=yield o(`gh repo list ${s} --limit 9999 --json \"nameWithOwner,description,isPrivate\" `);return p?JSON.parse(p).map(u):[]})" - } - ] + "template": "filepaths", + "generatorName": "api_graphql_string_viewer" }, { "name": "directory", @@ -2183,10 +2124,7 @@ "isDangerous": true, "args": { "name": "repository", - "generators": { - "script": "gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'", - "postProcess": "_NuFrRa_n=>{if(n){let o=`[${n.replace(/(?:\\r\\n|\\r|\\n)/g,\",\")}]`;try{return JSON.parse(o).map(u)}catch(i){return[]}}return[]}" - }, + "generatorName": "api_graphql_string_viewer", "isOptional": true }, "options": [ @@ -2208,10 +2146,7 @@ "description": "Edit repository settings", "args": { "name": "repository", - "generators": { - "script": "gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'", - "postProcess": "_NuFrRa_n=>{if(n){let o=`[${n.replace(/(?:\\r\\n|\\r|\\n)/g,\",\")}]`;try{return JSON.parse(o).map(u)}catch(i){return[]}}return[]}" - }, + "generatorName": "api_graphql_string_viewer", "isOptional": true }, "options": [ @@ -2315,16 +2250,8 @@ "description": "Create a fork of a repository.\nWith no argument, creates a fork of the current repository. Otherwise, forks\nthe specified repository.\nBy default, the new fork is set to be your 'origin' remote and any existing\norigin remote is renamed to 'upstream'. To alter this behavior, you can set\na name for the new fork's remote with --remote-name.\nAdditional 'git clone' flags can be passed in by listing them after '--'", "args": { "name": "repository", - "generators": [ - { - "script": "gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'", - "postProcess": "_NuFrRa_n=>{if(n){let o=`[${n.replace(/(?:\\r\\n|\\r|\\n)/g,\",\")}]`;try{return JSON.parse(o).map(u)}catch(i){return[]}}return[]}" - }, - { - "trigger": "/", - "custom": "_NuFrRa_(n,o)=>d(void 0,null,function*(){let i=n.pop();if(!i)return[];let r=i.split(\"/\");if(r.length===0)return[];let s=r.shift();if(!s)return[];let p=yield o(`gh repo list ${s} --limit 9999 --json \"nameWithOwner,description,isPrivate\" `);return p?JSON.parse(p).map(u):[]})" - } - ] + "template": "filepaths", + "generatorName": "api_graphql_string_viewer" }, "options": [ { @@ -2497,16 +2424,8 @@ "args": { "name": "repository", "isOptional": true, - "generators": [ - { - "script": "gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'", - "postProcess": "_NuFrRa_n=>{if(n){let o=`[${n.replace(/(?:\\r\\n|\\r|\\n)/g,\",\")}]`;try{return JSON.parse(o).map(u)}catch(i){return[]}}return[]}" - }, - { - "trigger": "/", - "custom": "_NuFrRa_(n,o)=>d(void 0,null,function*(){let i=n.pop();if(!i)return[];let r=i.split(\"/\");if(r.length===0)return[];let s=r.shift();if(!s)return[];let p=yield o(`gh repo list ${s} --limit 9999 --json \"nameWithOwner,description,isPrivate\" `);return p?JSON.parse(p).map(u):[]})" - } - ] + "template": "filepaths", + "generatorName": "api_graphql_string_viewer" }, "options": [ { diff --git a/command-signatures/json/git-flow.json b/command-signatures/json/git-flow.json index 67df5d08..1ebdf26e 100644 --- a/command-signatures/json/git-flow.json +++ b/command-signatures/json/git-flow.json @@ -34,9 +34,7 @@ "args": { "name": "name", "description": "The name of the feature branch to finish", - "generators": { - "custom": "_NuFrRa_(r,t)=>c(void 0,null,function*(){let e=yield l(r[1],t),n=yield t(\"git --no-optional-locks branch -a --no-color --sort=-committerdate\");return f(n,[e])})" - } + "template": "filepaths" } }, { @@ -81,9 +79,7 @@ "args": { "name": "name", "description": "The name of the release branch to finish", - "generators": { - "custom": "_NuFrRa_(r,t)=>c(void 0,null,function*(){let e=yield l(r[1],t),n=yield t(\"git --no-optional-locks branch -a --no-color --sort=-committerdate\");return f(n,[e])})" - } + "template": "filepaths" } } ] @@ -106,9 +102,7 @@ "args": { "name": "name", "description": "The name of the hotfix branch to finish", - "generators": { - "custom": "_NuFrRa_(r,t)=>c(void 0,null,function*(){let e=yield l(r[1],t),n=yield t(\"git --no-optional-locks branch -a --no-color --sort=-committerdate\");return f(n,[e])})" - } + "template": "filepaths" } } ] diff --git a/command-signatures/json/git.json b/command-signatures/json/git.json index a22d2ce7..06b8f122 100644 --- a/command-signatures/json/git.json +++ b/command-signatures/json/git.json @@ -2,6 +2,7 @@ "name": "git", "description": "The stupid content tracker", "generateSpec": "_NuFrRa_(o,t)=>p(void 0,null,function*(){let r=(yield t(\"compgen -c | grep git- | cut -c5- | sort -u\")).trim();return r===\"\"?{name:\"git\"}:{name:\"git\",subcommands:r.split(`\n`).map(a=>{var s;return f({name:a},(s=q[a])!=null?s:{description:`Run git-${a}`})})}})", + "aliasGenerator": "alias", "args": { "name": "alias", diff --git a/command-signatures/json/github.json b/command-signatures/json/github.json index ce7d2111..28dd5277 100644 --- a/command-signatures/json/github.json +++ b/command-signatures/json/github.json @@ -4,9 +4,7 @@ "args": { "name": "path", "isOptional": true, - "generators": { - "template": "folders" - } + "template": "folders" }, "options": [ { @@ -60,9 +58,7 @@ "args": { "name": "path", "isOptional": true, - "generators": { - "template": "folders" - } + "template": "folders" } }, { diff --git a/command-signatures/json/gpg.json b/command-signatures/json/gpg.json index 2150622a..ba59333b 100644 --- a/command-signatures/json/gpg.json +++ b/command-signatures/json/gpg.json @@ -399,10 +399,7 @@ "description": "Use name as cipher algorithm", "args": { "name": "name", - "generators": { - "script": "gpg --version", - "postProcess": "_NuFrRa_(e,a)=>{let i=e.substring(e.indexOf(\"Cypher: \")+8,e.indexOf(\"Hash: \"));return i=i.replace(/\\s+/g,\"\"),i.split(\",\").map(t=>({name:t}))}" - } + "generatorName": "completions" } }, { @@ -410,10 +407,7 @@ "description": "Use name as message digest algorithm", "args": { "name": "name", - "generators": { - "script": "gpg --version", - "postProcess": "_NuFrRa_(e,a)=>{let i=e.substring(e.indexOf(\"Hash: \")+8,e.indexOf(\"Compression: \"));return i=i.replace(/\\s+/g,\"\"),i.split(\",\").map(t=>({name:t}))}" - } + "generatorName": "completions" } }, { @@ -422,10 +416,7 @@ "args": { "name": "name", "default": "BLOWFISH", - "generators": { - "script": "gpg --version", - "postProcess": "_NuFrRa_(e,a)=>{let i=e.substring(e.indexOf(\"Cypher: \")+8,e.indexOf(\"Hash: \"));return i=i.replace(/\\s+/g,\"\"),i.split(\",\").map(t=>({name:t}))}" - } + "generatorName": "completions" } }, { @@ -434,10 +425,7 @@ "args": { "name": "name", "default": "RIPE-MD-160", - "generators": { - "script": "gpg --version", - "postProcess": "_NuFrRa_(e,a)=>{let i=e.substring(e.indexOf(\"Hash: \")+8,e.indexOf(\"Compression: \"));return i=i.replace(/\\s+/g,\"\"),i.split(\",\").map(t=>({name:t}))}" - } + "generatorName": "completions" } }, { @@ -485,10 +473,7 @@ "description": "Never allow the use of name as cipher algorithm", "args": { "name": "name", - "generators": { - "script": "gpg --version", - "postProcess": "_NuFrRa_(e,a)=>{let i=e.substring(e.indexOf(\"Cypher: \")+8,e.indexOf(\"Hash: \"));return i=i.replace(/\\s+/g,\"\"),i.split(\",\").map(t=>({name:t}))}" - } + "generatorName": "completions" } }, { @@ -930,10 +915,7 @@ { "name": "algo", "default": "*", - "generators": { - "script": "gpg --version", - "postProcess": "_NuFrRa_(e,a)=>{let i=e.substring(e.indexOf(\"Hash: \")+8,e.indexOf(\"Compression: \"));return i=i.replace(/\\s+/g,\"\"),i.split(\",\").map(t=>({name:t}))}" - } + "generatorName": "completions" }, { "name": "files", diff --git a/command-signatures/json/hexo.json b/command-signatures/json/hexo.json index 1b68ec1b..61e16646 100644 --- a/command-signatures/json/hexo.json +++ b/command-signatures/json/hexo.json @@ -163,10 +163,7 @@ { "name": "filename", "description": "The name of the post", - "generators": { - "script": "hexo list post | grep -E ^Draft", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(function(i){let e=i.replace(/^.* *_drafts\\//g,\"\").replace(/ *(.*)$/g,\"\").replace(/.md$/g,\"\");return{name:e,description:\"Draft for \"+e,icon:\"fig://icon?type=md\"}})" - } + "generatorName": "list_post_draft" } ] }, diff --git a/command-signatures/json/hub.json b/command-signatures/json/hub.json index a4b3928b..181f5de5 100644 --- a/command-signatures/json/hub.json +++ b/command-signatures/json/hub.json @@ -2,6 +2,7 @@ "name": "git", "description": "The stupid content tracker", "generateSpec": "_NuFrRa_(o,t)=>p(void 0,null,function*(){let r=(yield t(\"compgen -c | grep git- | cut -c5- | sort -u\")).trim();return r===\"\"?{name:\"git\"}:{name:\"git\",subcommands:r.split(`\n`).map(a=>{var s;return f({name:a},(s=q[a])!=null?s:{description:`Run git-${a}`})})}})", + "args": { "name": "alias", "description": "Custom user defined git alias", @@ -9,13 +10,7 @@ "alias": "_NuFrRa_(o,t)=>p(void 0,null,function*(){let i=yield t(`git config --get alias.${o}`);if(!i)throw new Error(\"Failed parsing alias\");return i})" }, "isOptional": true, - "generators": { - "script": "git --no-optional-locks config --get-regexp '^alias.'", - "cache": { - "strategy": "stale-while-revalidate" - }, - "postProcess": "_NuFrRa_o=>{let t=o.split(`\n`).map(r=>{let[a,...s]=r.slice(6).split(\" \"),n=s.join(\" \");return{name:a,description:`Alias for '${n}'`,icon:\"fig://icon?type=commandkey\"}}),i=new Set;return t.filter(r=>i.has(r.name)?!1:(i.add(r.name),!0))}" - } + "generatorName": "aliases" }, "options": [ { @@ -117,10 +112,7 @@ "args": [ { "name": "tree-ish", - "generators": { - "script": "git --no-optional-locks diff --cached --name-only", - "postProcess": "function(o,t){let i=l(o);return i.startsWith(\"fatal:\")?[]:i.split(`\n`).map(r=>({name:r,insertValue:(t.includes(\"--\")?\"\":\"-- \")+r,icon:\"fig://icon?type=file\",description:\"Staged file\"}))}" - } + "generatorName": "treeish" }, { "name": "path", @@ -294,10 +286,7 @@ "description": "Ignore when blaming", "args": { "name": "rev", - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "revs" } }, { @@ -422,10 +411,7 @@ "description": "Take an existing commit object, and reuse the log message and the authorship", "args": { "name": "commit", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -436,10 +422,7 @@ "description": "Like -C, but with -c the editor is invoked, so that the user can further edit", "args": { "name": "commit", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -447,10 +430,7 @@ "description": "Construct a commit message for use with rebase --autosquash. The commit messa", "args": { "name": "commit", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -458,10 +438,7 @@ "description": "Construct a commit message for use with rebase --autosquash. The commit messa", "args": { "name": "commit", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -2592,10 +2569,7 @@ "description": "Specify a web browser that may be used by some commands. Currently only git- instaweb(1) and git-help may use it" } ], - "generators": { - "script": "git config --get-regexp '.*'", - "postProcess": "_NuFrRa_o=>o.trim().split(`\n`).map(t=>t.slice(0,t.indexOf(\" \"))).filter(t=>t.startsWith(\"alias.\")||t.startsWith(\"branch.\")||t.startsWith(\"remote.\")||!S.find(({name:i})=>t===i)).map(t=>({name:t,icon:\"\\u2699\\uFE0F\"}))" - } + "generatorName": "settings_generator" }, { "name": "value" @@ -2611,10 +2585,7 @@ "description": "Starting point at which to create the new commits. If the --onto option is not specified, the starting point is . May be any valid commit, and not just an existing branch name. As a special case, you may use 'A...B' as a shortcut for the merge base of A and B if there is exactly one merge base. You can leave out at most one of A and B, in which case it defaults to HEAD", "args": { "name": "newbase", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -2906,18 +2877,12 @@ "args": [ { "name": "base", - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - }, + "generatorName": "branches", "isOptional": true }, { "name": "new base", - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - }, + "generatorName": "branches", "isOptional": true } ] @@ -3050,15 +3015,8 @@ "name": "pathspec", "isVariadic": true, "isOptional": true, - "generators": [ - { - "script": "git --no-optional-locks status --short", - "postProcess": "_NuFrRa_(o,t)=>{let i=l(o);if(i.startsWith(\"fatal:\"))return[];let r=i.split(`\n`).map(n=>{let c=[\"M\",\"A\"].includes(n.charAt(0));n=n.trim();let d=n.split(\" \");return{working:d[0],file:d.slice(1).join(\" \").trim(),alreadyAdded:c}}),a=i.split(`\n`).map(n=>n.slice(0,n.lastIndexOf(\"/\")+1).trim().split(\" \").slice(1).join(\" \").trim()),s=[];if(a.length>=2){let n=a[0],c=1;for(let d=1;d=2&&s.push(n),c=1),n=a[d]}return[...s.map(n=>({name:n+\"*\",description:\"Wildcard\",icon:\"fig://icon?type=asterisk\"})),...r.map(n=>{let c=n.file.replace(/^\"|\"$/g,\"\"),d=\"\";try{d=c.split(\".\").slice(-1)[0]}catch(b){}c.endsWith(\"/\")&&(d=\"folder\");let m=n.alreadyAdded||t.some(b=>b.includes(c))?50:100;return{name:c,icon:`fig://icon?type=${d}&color=ff0000&badge=${n.working}`,description:\"Changed file\",priority:m}})]}" - }, - { - "template": "folders" - } - ] + "template": "folders", + "generatorName": "status" } }, { @@ -3189,10 +3147,7 @@ "name": "pathspec", "isVariadic": true, "isOptional": true, - "generators": { - "script": "git --no-optional-locks status --short", - "postProcess": "_NuFrRa_(o,t)=>{let i=l(o);if(i.startsWith(\"fatal:\"))return[];let r=i.split(`\n`).map(n=>{let c=[\"M\",\"A\"].includes(n.charAt(0));n=n.trim();let d=n.split(\" \");return{working:d[0],file:d.slice(1).join(\" \").trim(),alreadyAdded:c}}),a=i.split(`\n`).map(n=>n.slice(0,n.lastIndexOf(\"/\")+1).trim().split(\" \").slice(1).join(\" \").trim()),s=[];if(a.length>=2){let n=a[0],c=1;for(let d=1;d=2&&s.push(n),c=1),n=a[d]}return[...s.map(n=>({name:n+\"*\",description:\"Wildcard\",icon:\"fig://icon?type=asterisk\"})),...r.map(n=>{let c=n.file.replace(/^\"|\"$/g,\"\"),d=\"\";try{d=c.split(\".\").slice(-1)[0]}catch(b){}c.endsWith(\"/\")&&(d=\"folder\");let m=n.alreadyAdded||t.some(b=>b.includes(c))?50:100;return{name:c,icon:`fig://icon?type=${d}&color=ff0000&badge=${n.working}`,description:\"Changed file\",priority:m}})]}" - } + "generatorName": "status" } }, { @@ -3354,10 +3309,7 @@ "name": "pathspec", "isVariadic": true, "isOptional": true, - "generators": { - "script": "git --no-optional-locks status --short", - "postProcess": "_NuFrRa_(o,t)=>{let i=l(o);if(i.startsWith(\"fatal:\"))return[];let r=i.split(`\n`).map(n=>{let c=[\"M\",\"A\"].includes(n.charAt(0));n=n.trim();let d=n.split(\" \");return{working:d[0],file:d.slice(1).join(\" \").trim(),alreadyAdded:c}}),a=i.split(`\n`).map(n=>n.slice(0,n.lastIndexOf(\"/\")+1).trim().split(\" \").slice(1).join(\" \").trim()),s=[];if(a.length>=2){let n=a[0],c=1;for(let d=1;d=2&&s.push(n),c=1),n=a[d]}return[...s.map(n=>({name:n+\"*\",description:\"Wildcard\",icon:\"fig://icon?type=asterisk\"})),...r.map(n=>{let c=n.file.replace(/^\"|\"$/g,\"\"),d=\"\";try{d=c.split(\".\").slice(-1)[0]}catch(b){}c.endsWith(\"/\")&&(d=\"folder\");let m=n.alreadyAdded||t.some(b=>b.includes(c))?50:100;return{name:c,icon:`fig://icon?type=${d}&color=ff0000&badge=${n.working}`,description:\"Changed file\",priority:m}})]}" - } + "generatorName": "status" } }, { @@ -3426,10 +3378,7 @@ "args": { "name": "commit", "isOptional": true, - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -3626,18 +3575,12 @@ { "name": "remote", "isOptional": true, - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(o){let t=o.split(`\n`).reduce((i,r)=>{let a=r.split(\"\t\"),s=a[0];console.log(s,a);let n=a[1].split(\" \")[0];return i[s]=n,i},{});return Object.keys(t).map(i=>{let r=t[i],a=\"box\";return r.includes(\"github.com\")&&(a=\"github\"),r.includes(\"gitlab.com\")&&(a=\"gitlab\"),r.includes(\"heroku.com\")&&(a=\"heroku\"),{name:i,icon:`fig://icon?type=${a}`,description:\"Remote\"}})}" - } + "generatorName": "remotes" }, { "name": "branch", "isOptional": true, - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" } ] }, @@ -3655,10 +3598,7 @@ "args": { "isOptional": true, "name": "remote", - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(o){let t=o.split(`\n`).reduce((i,r)=>{let a=r.split(\"\t\"),s=a[0];console.log(s,a);let n=a[1].split(\" \")[0];return i[s]=n,i},{});return Object.keys(t).map(i=>{let r=t[i],a=\"box\";return r.includes(\"github.com\")&&(a=\"github\"),r.includes(\"gitlab.com\")&&(a=\"gitlab\"),r.includes(\"heroku.com\")&&(a=\"heroku\"),{name:i,icon:`fig://icon?type=${a}`,description:\"Remote\"}})}" - }, + "generatorName": "remotes", "suggestions": [ "false", "true", @@ -3925,10 +3865,7 @@ "requiresSeparator": true, "args": { "name": "commit|glob", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" }, "description": "By default, Git will report, to the server, commits reachable from all local refs to find common commits in an attempt to reduce the size of the to-be-received packfile" }, @@ -4063,18 +4000,12 @@ { "name": "remote", "isOptional": true, - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(o){let t=o.split(`\n`).reduce((i,r)=>{let a=r.split(\"\t\"),s=a[0];console.log(s,a);let n=a[1].split(\" \")[0];return i[s]=n,i},{});return Object.keys(t).map(i=>{let r=t[i],a=\"box\";return r.includes(\"github.com\")&&(a=\"github\"),r.includes(\"gitlab.com\")&&(a=\"gitlab\"),r.includes(\"heroku.com\")&&(a=\"heroku\"),{name:i,icon:`fig://icon?type=${a}`,description:\"Remote\"}})}" - } + "generatorName": "remotes" }, { "name": "branch", "isOptional": true, - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" } ] }, @@ -4137,16 +4068,8 @@ "insertValue": "HEAD~" } ], - "generators": [ - { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, - { - "script": "function(o){return o.includes(\"--staged\")||o.includes(\"--cached\")?\"git --no-optional-locks status --short | sed -ne '/^M /p' -e '/A /p'\":\"git --no-optional-locks status --short | sed -ne '/M /p' -e '/A /p'\"}", - "postProcess": "_NuFrRa_(o,t)=>{let i=l(o);return i.startsWith(\"fatal:\")?[]:[...i.split(`\n`).map(a=>{let s=a.trim().split(\" \");return{working:s[0],file:s.slice(1).join(\" \").trim()}}).map(a=>{let s=a.file.replace(/^\"|\"$/g,\"\"),n=\"\";try{n=s.split(\".\").slice(-1)[0]}catch(c){}return s.endsWith(\"/\")&&(n=\"folder\"),{name:s,icon:`fig://icon?type=${n}&color=ff0000&badge=${a.working}`,description:\"Changed tracked files\",priority:t.some(c=>c.includes(s))?50:100}})]}" - } - ] + "template": "filepaths", + "generatorName": "log" } }, { @@ -4242,15 +4165,9 @@ "insertValue": "HEAD~" } ], - "generators": [ - { - "script": "git --no-optional-locks diff --cached --name-only", - "postProcess": "function(o,t){let i=l(o);return i.startsWith(\"fatal:\")?[]:i.split(`\n`).map(r=>({name:r,insertValue:(t.includes(\"--\")?\"\":\"-- \")+r,icon:\"fig://icon?type=file\",description:\"Staged file\"}))}" - }, - { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": [ + "treeish", + "log" ] } }, @@ -4315,10 +4232,7 @@ "name": "since", "isOptional": true, "description": "Commit ID, branch name, HEAD, or revision reference", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "log", "suggestions": [ { "name": "HEAD", @@ -4335,10 +4249,7 @@ "name": "until", "isOptional": true, "description": "Commit ID, branch name, HEAD, or revision reference", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "log", "suggestions": [ { "name": "HEAD", @@ -4464,10 +4375,7 @@ "description": "Removes given remote [name]", "args": { "name": "remote", - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(o){let t=o.split(`\n`).reduce((i,r)=>{let a=r.split(\"\t\"),s=a[0];console.log(s,a);let n=a[1].split(\" \")[0];return i[s]=n,i},{});return Object.keys(t).map(i=>{let r=t[i],a=\"box\";return r.includes(\"github.com\")&&(a=\"github\"),r.includes(\"gitlab.com\")&&(a=\"gitlab\"),r.includes(\"heroku.com\")&&(a=\"heroku\"),{name:i,icon:`fig://icon?type=${a}`,description:\"Remote\"}})}" - } + "generatorName": "remotes" } }, { @@ -4476,10 +4384,7 @@ "args": [ { "name": "old remote", - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(o){let t=o.split(`\n`).reduce((i,r)=>{let a=r.split(\"\t\"),s=a[0];console.log(s,a);let n=a[1].split(\" \")[0];return i[s]=n,i},{});return Object.keys(t).map(i=>{let r=t[i],a=\"box\";return r.includes(\"github.com\")&&(a=\"github\"),r.includes(\"gitlab.com\")&&(a=\"gitlab\"),r.includes(\"heroku.com\")&&(a=\"heroku\"),{name:i,icon:`fig://icon?type=${a}`,description:\"Remote\"}})}" - } + "generatorName": "remotes" }, { "name": "new remote name" @@ -4607,18 +4512,12 @@ { "name": "remote", "isOptional": true, - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(o){let t=o.split(`\n`).reduce((i,r)=>{let a=r.split(\"\t\"),s=a[0];console.log(s,a);let n=a[1].split(\" \")[0];return i[s]=n,i},{});return Object.keys(t).map(i=>{let r=t[i],a=\"box\";return r.includes(\"github.com\")&&(a=\"github\"),r.includes(\"gitlab.com\")&&(a=\"gitlab\"),r.includes(\"heroku.com\")&&(a=\"heroku\"),{name:i,icon:`fig://icon?type=${a}`,description:\"Remote\"}})}" - } + "generatorName": "remotes" }, { "name": "branch", "isOptional": true, - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" }, { "name": "refspec", @@ -4686,10 +4585,7 @@ "requiresSeparator": true, "args": { "name": "commit|glob", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" }, "description": "By default, Git will report, to the server, commits reachable from all local refs to find common commits in an attempt to reduce the size of the to-be-received packfile" }, @@ -4976,10 +4872,7 @@ "args": { "name": "stash", "isOptional": true, - "generators": { - "script": "git --no-optional-locks stash list", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.split(\":\")[2],insertValue:i.split(\":\")[0],icon:\"fig://icon?type=node\"}))}" - } + "generatorName": "stashes" } }, { @@ -5047,10 +4940,7 @@ "args": { "name": "stash", "isOptional": true, - "generators": { - "script": "git --no-optional-locks stash list", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.split(\":\")[2],insertValue:i.split(\":\")[0],icon:\"fig://icon?type=node\"}))}" - } + "generatorName": "stashes" } }, { @@ -5074,10 +4964,7 @@ "args": { "name": "stash", "isOptional": true, - "generators": { - "script": "git --no-optional-locks stash list", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.split(\":\")[2],insertValue:i.split(\":\")[0],icon:\"fig://icon?type=node\"}))}" - } + "generatorName": "stashes" } }, { @@ -5103,10 +4990,7 @@ "args": { "name": "stash", "isOptional": true, - "generators": { - "script": "git --no-optional-locks stash list", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.split(\":\")[2],insertValue:i.split(\":\")[0],icon:\"fig://icon?type=node\"}))}" - } + "generatorName": "stashes" } }, { @@ -5116,18 +5000,12 @@ "args": [ { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" }, { "name": "stash", "isOptional": true, - "generators": { - "script": "git --no-optional-locks stash list", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.split(\":\")[2],insertValue:i.split(\":\")[0],icon:\"fig://icon?type=node\"}))}" - } + "generatorName": "stashes" } ] }, @@ -5168,10 +5046,7 @@ }, { "name": "commit", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } ] } @@ -5582,10 +5457,7 @@ "description": "Current directory" } ], - "generators": { - "script": "git --no-optional-locks status --short", - "postProcess": "_NuFrRa_(o,t)=>{let i=l(o);if(i.startsWith(\"fatal:\"))return[];let r=i.split(`\n`).map(n=>{let c=[\"M\",\"A\"].includes(n.charAt(0));n=n.trim();let d=n.split(\" \");return{working:d[0],file:d.slice(1).join(\" \").trim(),alreadyAdded:c}}),a=i.split(`\n`).map(n=>n.slice(0,n.lastIndexOf(\"/\")+1).trim().split(\" \").slice(1).join(\" \").trim()),s=[];if(a.length>=2){let n=a[0],c=1;for(let d=1;d=2&&s.push(n),c=1),n=a[d]}return[...s.map(n=>({name:n+\"*\",description:\"Wildcard\",icon:\"fig://icon?type=asterisk\"})),...r.map(n=>{let c=n.file.replace(/^\"|\"$/g,\"\"),d=\"\";try{d=c.split(\".\").slice(-1)[0]}catch(b){}c.endsWith(\"/\")&&(d=\"folder\");let m=n.alreadyAdded||t.some(b=>b.includes(c))?50:100;return{name:c,icon:`fig://icon?type=${d}&color=ff0000&badge=${n.working}`,description:\"Changed file\",priority:m}})]}" - } + "generatorName": "status" }, "options": [ { @@ -5620,10 +5492,7 @@ { "name": "bad", "isOptional": true, - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "revs", "suggestions": [ { "name": "HEAD", @@ -5639,15 +5508,9 @@ { "name": "good", "isOptional": true, - "generators": [ - { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, - { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": [ + "revs", + "revs" ], "suggestions": [ { @@ -5716,10 +5579,7 @@ "args": { "name": "rev", "isOptional": true, - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "revs", "suggestions": [ { "name": "HEAD", @@ -5739,10 +5599,7 @@ "args": { "name": "rev", "isOptional": true, - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "revs", "suggestions": [ { "name": "HEAD", @@ -5762,10 +5619,7 @@ "args": { "name": "rev", "isOptional": true, - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "revs", "suggestions": [ { "name": "HEAD", @@ -5786,10 +5640,7 @@ "args": { "name": "rev", "isOptional": true, - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "revs", "suggestions": [ { "name": "HEAD", @@ -5829,10 +5680,7 @@ "name": "rev | range", "isVariadic": true, "isOptional": true, - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "revs", "suggestions": [ { "name": "HEAD", @@ -5852,10 +5700,7 @@ "args": { "name": "commit", "isOptional": true, - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "log", "suggestions": [ { "name": "HEAD", @@ -5942,9 +5787,7 @@ ], "description": "Delete fully merged branch", "args": { - "generators": { - "custom": "_NuFrRa_(o,t)=>p(void 0,null,function*(){let i=g({insertWithoutRemotes:!0});return o.includes(\"-r\")?i(yield t(\"git --no-optional-locks branch -r --no-color --sort=-committerdate\"),o):i(yield t(\"git --no-optional-locks branch --no-color --sort=-committerdate\"),o)})" - }, + "template": "filepaths", "isVariadic": true, "suggestions": [ { @@ -5961,9 +5804,7 @@ "name": "-D", "description": "Delete branch (even if not merged)", "args": { - "generators": { - "custom": "_NuFrRa_(o,t)=>p(void 0,null,function*(){let i=g({insertWithoutRemotes:!0});return o.includes(\"-r\")?i(yield t(\"git --no-optional-locks branch -r --no-color --sort=-committerdate\"),o):i(yield t(\"git --no-optional-locks branch --no-color --sort=-committerdate\"),o)})" - }, + "template": "filepaths", "isVariadic": true, "suggestions": [ { @@ -6013,10 +5854,7 @@ "name": "--edit-description", "description": "Edit the description for the branch", "args": { - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" } }, { @@ -6156,10 +5994,7 @@ "args": { "name": "upstream", "isOptional": true, - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" } }, { @@ -6168,10 +6003,7 @@ "args": { "name": "upstream", "isOptional": true, - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "branches" } }, { @@ -6180,10 +6012,7 @@ "args": { "name": "commit", "isOptional": true, - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -6192,10 +6021,7 @@ "args": { "name": "commit", "isOptional": true, - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } }, { @@ -6396,21 +6222,13 @@ "name": "branch, file, tag or commit", "description": "Branch, file, tag or commit to switch to", "isOptional": true, - "generators": [ - { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - }, - { - "script": "git --no-optional-locks tag --list --sort=-committerdate", - "postProcess": "function(o){return o.split(`\n`).map(t=>({name:t,icon:\"\\u{1F3F7}\\uFE0F\"}))}" - }, - { - "template": [ - "filepaths", - "folders" - ] - } + "template": [ + "filepaths", + "folders" + ], + "generatorName": [ + "branches_no", + "tag" ], "suggestions": [ { @@ -6458,10 +6276,7 @@ "name": "commit", "description": "Commits to cherry-pick", "isVariadic": true, - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" }, "options": [ { @@ -7003,10 +6818,7 @@ "description": "Join two or more development histories together", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - }, + "generatorName": "branches_no", "isVariadic": true, "isOptional": true, "suggestions": [ @@ -7336,10 +7148,7 @@ "description": "List tags of the given object", "args": { "name": "object", - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - }, + "generatorName": "log", "suggestions": [ { "name": "HEAD", @@ -7357,10 +7166,7 @@ "args": { "name": "tagname", "description": "Select a tag", - "generators": { - "script": "git --no-optional-locks tag --list --sort=-committerdate", - "postProcess": "function(o){return o.split(`\n`).map(t=>({name:t,icon:\"\\u{1F3F7}\\uFE0F\"}))}" - }, + "generatorName": "tag", "isOptional": true } }, @@ -7515,10 +7321,7 @@ "name": "pathspec", "isOptional": true, "isVariadic": true, - "generators": { - "script": "git --no-optional-locks status --short", - "postProcess": "_NuFrRa_(o,t)=>{let i=l(o);if(i.startsWith(\"fatal:\"))return[];let r=i.split(`\n`).map(n=>{let c=[\"M\",\"A\"].includes(n.charAt(0));n=n.trim();let d=n.split(\" \");return{working:d[0],file:d.slice(1).join(\" \").trim(),alreadyAdded:c}}),a=i.split(`\n`).map(n=>n.slice(0,n.lastIndexOf(\"/\")+1).trim().split(\" \").slice(1).join(\" \").trim()),s=[];if(a.length>=2){let n=a[0],c=1;for(let d=1;d=2&&s.push(n),c=1),n=a[d]}return[...s.map(n=>({name:n+\"*\",description:\"Wildcard\",icon:\"fig://icon?type=asterisk\"})),...r.map(n=>{let c=n.file.replace(/^\"|\"$/g,\"\"),d=\"\";try{d=c.split(\".\").slice(-1)[0]}catch(b){}c.endsWith(\"/\")&&(d=\"folder\");let m=n.alreadyAdded||t.some(b=>b.includes(c))?50:100;return{name:c,icon:`fig://icon?type=${d}&color=ff0000&badge=${n.working}`,description:\"Changed file\",priority:m}})]}" - } + "generatorName": "status" } }, { @@ -7655,10 +7458,7 @@ { "name": "branch name", "description": "Branch or commit to switch to", - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let s=a.trim(),n=a.match(/\\S+/g);if(n.length>1){if(n[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};n[0]===\"+\"&&(s=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&s.startsWith(\"remotes/\")&&(s=s.slice(s.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:s,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - }, + "generatorName": "branches", "suggestions": [ { "name": "-", @@ -7669,10 +7469,7 @@ { "name": "start point", "isOptional": true, - "generators": { - "script": "git --no-optional-locks log --oneline", - "postProcess": "function(o){let t=l(o);return t.startsWith(\"fatal:\")?[]:t.split(`\n`).map(i=>({name:i.substring(0,7),icon:\"fig://icon?type=node\",description:i.substring(7)}))}" - } + "generatorName": "log" } ] }, diff --git a/command-signatures/json/hugo.json b/command-signatures/json/hugo.json index db612dab..9335869b 100644 --- a/command-signatures/json/hugo.json +++ b/command-signatures/json/hugo.json @@ -2550,10 +2550,7 @@ "description": "Content type to create", "args": { "name": "archetype|default", - "generators": { - "script": "ls ./archetypes/", - "postProcess": "_NuFrRa_a=>a.split(`\n`).map(i=>({name:i.slice(0,i.lastIndexOf(\".\")),icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls_archetypes" } }, { diff --git a/command-signatures/json/hyper.json b/command-signatures/json/hyper.json index ab17d6a4..87670a85 100644 --- a/command-signatures/json/hyper.json +++ b/command-signatures/json/hyper.json @@ -69,10 +69,7 @@ "args": { "name": "plugin", "description": "Plugin to uninstall", - "generators": { - "script": "hyper list", - "postProcess": "function(e){return e.split(`\n`).map(n=>({name:n,description:\"Plugin name\"}))}" - } + "generatorName": "list" } }, { diff --git a/command-signatures/json/id.json b/command-signatures/json/id.json index 9149cc1a..3ef9bb62 100644 --- a/command-signatures/json/id.json +++ b/command-signatures/json/id.json @@ -137,9 +137,6 @@ "args": { "name": "user", "isOptional": true, - "generators": { - "script": "dscl . -list /Users | grep -v '^_'", - "postProcess": "_NuFrRa_s=>s.trim().split(`\n`).map(i=>({name:i,icon:\"fig://template?badge=\\u{1F464}\"}))" - } + "generatorName": "dscl_users" } } diff --git a/command-signatures/json/iex.json b/command-signatures/json/iex.json index 09cabcd2..3e97be67 100644 --- a/command-signatures/json/iex.json +++ b/command-signatures/json/iex.json @@ -5,10 +5,7 @@ { "name": "file", "description": ".exs file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(f=[])=>{let l=f.filter(({name:d=\"\",type:j})=>{if(i!==\"filter\"&&j===\"folder\")return i===\"always\";if(c.has(d)||a&&new RegExp(a.source,a.flags).test(d))return!0;let[,...m]=d.split(\".\");if(m.length>=1){let g=m.length-1,E=m[g];do{if(o.has(E))return!0;g-=1,E=[m[g],E].join(\".\")}while(g>=0)}return!1});return!s&&!r?l:l.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" }, { "name": "data", diff --git a/command-signatures/json/ignite-cli.json b/command-signatures/json/ignite-cli.json index bed459d2..c50946c6 100644 --- a/command-signatures/json/ignite-cli.json +++ b/command-signatures/json/ignite-cli.json @@ -47,10 +47,7 @@ "args": [ { "name": "generator", - "generators": { - "script": "ls ignite/templates", - "postProcess": "_NuFrRa_e=>e.trim()===\"\"?[]:e.split(`\n`).map(t=>({name:t}))" - }, + "generatorName": "ls_ignite_templates", "isOptional": true }, { @@ -74,10 +71,7 @@ "description": "Update installed generators", "args": { "name": "generator", - "generators": { - "script": "ls ignite/templates", - "postProcess": "_NuFrRa_e=>e.trim()===\"\"?[]:e.split(`\n`).map(t=>({name:t}))" - } + "generatorName": "ls_ignite_templates" }, "options": [ { diff --git a/command-signatures/json/j.json b/command-signatures/json/j.json index e0f9f4a7..6c6b1dbb 100644 --- a/command-signatures/json/j.json +++ b/command-signatures/json/j.json @@ -71,9 +71,6 @@ "name": "directory", "description": "Directory to jump to", "isVariadic": true, - "generators": { - "script": "cat \"$HOME\"/Library/autojump/autojump.txt", - "postProcess": "_NuFrRa_(i,e)=>{let t=i.split(`\n`).map(n=>{let[r,o]=n.split(\"\t\");return{weight:Number(r),dir:o}}),s=e.slice(1,e.length-1);return t.filter(({dir:n})=>s.every(r=>n.includes(r))).map(({weight:n,dir:r})=>{let o=r.split(\"/\"),a=o[o.length-1];if(!s.includes(a))return{name:a,description:r,priority:75+n}})}" - } + "generatorName": "cat" } } diff --git a/command-signatures/json/java.json b/command-signatures/json/java.json index e63a5f6d..5026a5e8 100644 --- a/command-signatures/json/java.json +++ b/command-signatures/json/java.json @@ -7,10 +7,7 @@ "args": { "name": "mainclass", "description": "To launch a class file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let c=h.filter(({name:u=\"\",type:F})=>{if(i!==\"filter\"&&F===\"folder\")return i===\"always\";if(l.has(u)||r&&new RegExp(r.source,r.flags).test(u))return!0;let[,...p]=u.split(\".\");if(p.length>=1){let y=p.length-1,_=p[y];do{if(a.has(_))return!0;y-=1,_=[p[y],_].join(\".\")}while(y>=0)}return!1});return!o&&!s?c:c.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" }, "options": [ { @@ -19,10 +16,7 @@ "description": "To launch the main class in a JAR file", "args": { "name": "JAR file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let c=h.filter(({name:u=\"\",type:F})=>{if(i!==\"filter\"&&F===\"folder\")return i===\"always\";if(l.has(u)||r&&new RegExp(r.source,r.flags).test(u))return!0;let[,...p]=u.split(\".\");if(p.length>=1){let y=p.length-1,_=p[y];do{if(a.has(_))return!0;y-=1,_=[p[y],_].join(\".\")}while(y>=0)}return!1});return!o&&!s?c:c.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/julia.json b/command-signatures/json/julia.json index a4adfed7..26edad8f 100644 --- a/command-signatures/json/julia.json +++ b/command-signatures/json/julia.json @@ -34,9 +34,7 @@ "description": "Search through parent directories until a Project.toml or JuliaProject.toml file is found" } ], - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -47,10 +45,7 @@ "description": "Start up with the given system image file", "args": { "name": "system image", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let l=p.filter(({name:u=\"\",type:I})=>{if(i!==\"filter\"&&I===\"folder\")return i===\"always\";if(c.has(u)||a&&new RegExp(a.source,a.flags).test(u))return!0;let[,...g]=u.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(r.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!s&&!o?l:l.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?s:o)||{}))}" - } + "template": "filepaths" } }, { @@ -149,10 +144,7 @@ "description": "Load given file immediately on all processors", "args": { "name": "julia script", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let l=p.filter(({name:u=\"\",type:I})=>{if(i!==\"filter\"&&I===\"folder\")return i===\"always\";if(c.has(u)||a&&new RegExp(a.source,a.flags).test(u))return!0;let[,...g]=u.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(r.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!s&&!o?l:l.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?s:o)||{}))}" - } + "template": "filepaths" } }, { @@ -518,9 +510,6 @@ "name": "julia script", "isScript": true, "isOptional": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let l=p.filter(({name:u=\"\",type:I})=>{if(i!==\"filter\"&&I===\"folder\")return i===\"always\";if(c.has(u)||a&&new RegExp(a.source,a.flags).test(u))return!0;let[,...g]=u.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(r.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!s&&!o?l:l.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?s:o)||{}))}" - } + "template": "filepaths" } } diff --git a/command-signatures/json/kool.json b/command-signatures/json/kool.json index 4bef3927..d060b68b 100644 --- a/command-signatures/json/kool.json +++ b/command-signatures/json/kool.json @@ -388,10 +388,7 @@ "description": "Service you want to restart", "isOptional": true, "isVariadic": true, - "generators": { - "script": "docker-compose config --services", - "splitOn": "\n" - } + "generatorName": "docker_compose_config" } }, { @@ -424,10 +421,7 @@ "args": { "name": "script", "description": "Script to be executed", - "generators": { - "script": "kool run --help", - "postProcess": "_NuFrRa_n=>{let t=n.split(`\n`),i=t.findIndex(e=>e.trim()===\"Available Scripts:\");return t.slice(i+1).map(e=>({name:e.trim(),description:\"Script\"}))}" - } + "generatorName": "run" } }, { @@ -529,10 +523,7 @@ "description": "Service you want to start", "isOptional": true, "isVariadic": true, - "generators": { - "script": "docker-compose config --services", - "splitOn": "\n" - } + "generatorName": "docker_compose_config" } }, { @@ -577,10 +568,7 @@ "description": "Service you want to stop", "isOptional": true, "isVariadic": true, - "generators": { - "script": "docker-compose config --services", - "splitOn": "\n" - } + "generatorName": "docker_compose_config" } } ], diff --git a/command-signatures/json/kubecolor.json b/command-signatures/json/kubecolor.json index 431ef886..8160363e 100644 --- a/command-signatures/json/kubecolor.json +++ b/command-signatures/json/kubecolor.json @@ -684,10 +684,7 @@ "description": "Container name. If omitted, the first container in the pod will be chosen", "args": { "name": "Container", - "generators": { - "script": "_NuFrRa_r=>{let i=r.findIndex(c=>c===\"pods\"||c.includes(\"pods/\")||c===\"pod\"||c.includes(\"pod/\"));return`kubectl get ${r[i].includes(\"/\")?r[i]:`${r[i]} + ${r[i+1]}`} -o json`}", - "postProcess": "function(r){return s.connectedToCluster(r)||s.generalError(r)?[]:JSON.parse(r).spec.containers.map(i=>({name:i.name,description:i.image,icon:\"fig://icon?type=kubernetes\"}))}" - } + "template": "filepaths" } }, { @@ -2442,10 +2439,7 @@ "description": "The name of the resource to create a Job from (only cronjob is supported)", "args": { "name": "Cronjob", - "generators": { - "script": "_NuFrRa_()=>o.typeWithoutName(\"cronjob\")", - "postProcess": "_NuFrRa_(r,i)=>n(r,i).map(a=>l(u({},a),{name:`cronjob/${a.name}`}))" - } + "template": "filepaths" } }, { @@ -4089,10 +4083,7 @@ "description": "Container name. If omitted, the first container in the pod will be chosen", "args": { "name": "Container", - "generators": { - "script": "_NuFrRa_r=>{let i=r.findIndex(c=>c===\"pods\"||c.includes(\"pods/\")||c===\"pod\"||c.includes(\"pod/\"));return`kubectl get ${r[i].includes(\"/\")?r[i]:`${r[i]} + ${r[i+1]}`} -o json`}", - "postProcess": "function(r){return s.connectedToCluster(r)||s.generalError(r)?[]:JSON.parse(r).spec.containers.map(i=>({name:i.name,description:i.image,icon:\"fig://icon?type=kubernetes\"}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/kubectl.json b/command-signatures/json/kubectl.json index a40423db..89f7e219 100644 --- a/command-signatures/json/kubectl.json +++ b/command-signatures/json/kubectl.json @@ -688,10 +688,7 @@ "description": "Container name. If omitted, the first container in the pod will be chosen", "args": { "name": "Container", - "generators": { - "script": "_NuFrRa_r=>{let i=r.findIndex(c=>c===\"pods\"||c.includes(\"pods/\")||c===\"pod\"||c.includes(\"pod/\"));return`kubectl get ${r[i].includes(\"/\")?r[i]:`${r[i]} + ${r[i+1]}`} -o json`}", - "postProcess": "function(r){return s.connectedToCluster(r)||s.generalError(r)?[]:JSON.parse(r).spec.containers.map(i=>({name:i.name,description:i.image,icon:\"fig://icon?type=kubernetes\"}))}" - } + "template": "filepaths" } }, { @@ -2459,10 +2456,7 @@ "description": "The name of the resource to create a Job from (only cronjob is supported)", "args": { "name": "Cronjob", - "generators": { - "script": "_NuFrRa_()=>o.typeWithoutName(\"cronjob\")", - "postProcess": "_NuFrRa_(r,i)=>n(r,i).map(a=>l(u({},a),{name:`cronjob/${a.name}`}))" - } + "template": "filepaths" } }, { @@ -4117,10 +4111,7 @@ "description": "Container name. If omitted, the first container in the pod will be chosen", "args": { "name": "Container", - "generators": { - "script": "_NuFrRa_r=>{let i=r.findIndex(c=>c===\"pods\"||c.includes(\"pods/\")||c===\"pod\"||c.includes(\"pod/\"));return`kubectl get ${r[i].includes(\"/\")?r[i]:`${r[i]} + ${r[i+1]}`} -o json`}", - "postProcess": "function(r){return s.connectedToCluster(r)||s.generalError(r)?[]:JSON.parse(r).spec.containers.map(i=>({name:i.name,description:i.image,icon:\"fig://icon?type=kubernetes\"}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/lerna.json b/command-signatures/json/lerna.json index a5993fe1..df930768 100644 --- a/command-signatures/json/lerna.json +++ b/command-signatures/json/lerna.json @@ -113,10 +113,7 @@ "description": "Include only packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -124,10 +121,7 @@ "description": "Exclude packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -406,10 +400,7 @@ "description": "Force publish for the specified packages (comma-separated)", "args": { "name": "packages", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - }, + "generatorName": "ls", "suggestions": [ { "name": "*", @@ -598,10 +589,7 @@ "args": { "name": "package", "isOptional": true, - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" }, "options": [ { @@ -749,10 +737,7 @@ "description": "Include only packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -760,10 +745,7 @@ "description": "Exclude packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -826,10 +808,7 @@ "args": { "name": "script", "description": "Name of the npm script to run", - "generators": { - "script": "lerna list -p | while read p; do\n \\cat $p/package.json && echo END\ndone", - "postProcess": "_NuFrRa_e=>{let n=e.split(l).filter(t=>t.trim()!==\"\"),a=[];return n.forEach(t=>{let f=JSON.parse(t);a=a.concat(Object.keys(f.scripts))}),Array.from(new Set(a)).map(t=>({name:t,icon:\"fig://icon?type=npm\"}))}" - } + "generatorName": "list_while_read_p" } }, { @@ -949,10 +928,7 @@ "description": "An allowlist of globs that match git branches where lerna version is enabled", "args": { "name": "glob", - "generators": { - "script": "git branch --no-color", - "postProcess": "function(e){return e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(n=>({name:n.replace(\"*\",\"\").trim(),description:\"Branch\",icon:\"fig://icon?type=git\"}))}" - } + "generatorName": "git_branch" } }, { @@ -1003,10 +979,7 @@ "description": "Push the git changes to the specified remote instead of origin", "args": { "name": "remote", - "generators": { - "script": "git remote", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,description:\"Remote\",icon:\"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Git_icon.svg/1024px-Git_icon.svg.png\"}))" - } + "generatorName": "git_remote" } }, { @@ -1089,10 +1062,7 @@ "description": "Diff all packages or a single package since the last release", "args": { "name": "package", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - }, + "generatorName": "ls", "isOptional": true } }, @@ -1172,10 +1142,7 @@ "description": "Include only packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -1183,10 +1150,7 @@ "description": "Exclude packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -1248,10 +1212,7 @@ ], "args": { "name": "command", - "generators": { - "script": "lerna list -p | while read p; do\n \\cat $p/package.json && echo END\ndone", - "postProcess": "_NuFrRa_e=>{let n=e.split(l).filter(t=>t.trim()!==\"\"),a=[];return n.forEach(t=>{let f=JSON.parse(t);a=a.concat(Object.keys(f.scripts))}),Array.from(new Set(a)).map(t=>({name:t,icon:\"fig://icon?type=npm\"}))}" - } + "generatorName": "list_while_read_p" } }, { @@ -1330,10 +1291,7 @@ "description": "Include only packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -1341,10 +1299,7 @@ "description": "Exclude packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -1476,10 +1431,7 @@ "description": "Include only packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { @@ -1487,10 +1439,7 @@ "description": "Exclude packages with names matching the given glob", "args": { "name": "glob", - "generators": { - "script": "lerna ls", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(n=>({name:n,icon:\"fig://icon?type=string\"}))" - } + "generatorName": "ls" } }, { diff --git a/command-signatures/json/limactl.json b/command-signatures/json/limactl.json index 02e6d317..7c6adc92 100644 --- a/command-signatures/json/limactl.json +++ b/command-signatures/json/limactl.json @@ -115,27 +115,13 @@ { "name": "SOURCE", "isVariadic": true, - "generators": [ - { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - }, - { - "template": "filepaths" - } - ] + "template": "filepaths", + "generatorName": "list" }, { "name": "TARGET", - "generators": [ - { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - }, - { - "template": "filepaths" - } - ] + "template": "filepaths", + "generatorName": "list" } ], "options": [ @@ -169,10 +155,7 @@ "args": { "name": "INSTANCE", "isVariadic": true, - "generators": { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - } + "generatorName": "list" }, "options": [ { @@ -268,10 +251,7 @@ "args": [ { "name": "INSTANCE", - "generators": { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - } + "generatorName": "list" }, { "name": "COMMAND", @@ -306,10 +286,7 @@ "description": "Show the ssh command line", "args": { "name": "INSTANCE", - "generators": { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - } + "generatorName": "list" }, "options": [ { @@ -359,16 +336,8 @@ "description": "Start an instance of Lima. If the instance does not exist, open an editor for creating new one, with name \"default\"", "args": { "name": "NAME|FILE.yaml|URL", - "generators": [ - { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - }, - { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(f=[])=>{let l=f.filter(({name:u=\"\",type:G})=>{if(i!==\"filter\"&&G===\"folder\")return i===\"always\";if(d.has(u)||s&&new RegExp(s.source,s.flags).test(u))return!0;let[,...h]=u.split(\".\");if(h.length>=1){let y=h.length-1,O=h[y];do{if(c.has(O))return!0;y-=1,O=[h[y],O].join(\".\")}while(y>=0)}return!1});return!o&&!r?l:l.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?o:r)||{}))}" - } - ] + "template": "filepaths", + "generatorName": "list" }, "options": [ { @@ -394,10 +363,7 @@ "isDangerous": true, "args": { "name": "INSTANCE", - "generators": { - "script": "limactl list --quiet", - "postProcess": "_NuFrRa_t=>t.split(`\n`).map(n=>D({name:`${n}`,description:\"Instance name\",priority:R},e))" - } + "generatorName": "list" }, "options": [ { @@ -453,10 +419,7 @@ "args": { "name": "FILE.yaml", "isVariadic": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(f=[])=>{let l=f.filter(({name:u=\"\",type:G})=>{if(i!==\"filter\"&&G===\"folder\")return i===\"always\";if(d.has(u)||s&&new RegExp(s.source,s.flags).test(u))return!0;let[,...h]=u.split(\".\");if(h.length>=1){let y=h.length-1,O=h[y];do{if(c.has(O))return!0;y-=1,O=[h[y],O].join(\".\")}while(y>=0)}return!1});return!o&&!r?l:l.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?o:r)||{}))}" - } + "template": "filepaths" }, "options": [ { diff --git a/command-signatures/json/mackup.json b/command-signatures/json/mackup.json index ae50b88b..77d4f34b 100644 --- a/command-signatures/json/mackup.json +++ b/command-signatures/json/mackup.json @@ -53,10 +53,7 @@ "description": "Show the current configuration", "args": { "name": "application", - "generators": { - "script": "mackup list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).filter(e=>e.includes(\"-\")).map(e=>({name:e.substring(3)}))" - } + "generatorName": "list" } }, { diff --git a/command-signatures/json/man.json b/command-signatures/json/man.json index 2eef3486..7a6c9809 100644 --- a/command-signatures/json/man.json +++ b/command-signatures/json/man.json @@ -73,10 +73,7 @@ "description": "Specify the list of directories to search (colon separated)", "args": { "name": "path", - "generators": { - "template": "folders", - "getQueryTerm": ":" - } + "template": "folders" } }, { @@ -107,10 +104,7 @@ "description": "Specify a colon-separated list of manual sections to search", "args": { "name": "sections", - "generators": { - "getQueryTerm": ":", - "custom": "_NuFrRa_n=>c(void 0,null,function*(){return Object.entries(o).filter(([e])=>!n[n.length-1].includes(e)).map(([e,t])=>({name:e,description:t,insertValue:e+\":\",icon:p}))})" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/mdfind.json b/command-signatures/json/mdfind.json index 8233098b..5ea4b728 100644 --- a/command-signatures/json/mdfind.json +++ b/command-signatures/json/mdfind.json @@ -50,11 +50,7 @@ "args": { "name": "folder", "description": "Smart folder in ~/Library/Saved Searches", - "generators": { - "script": "ls -1A ~/Library/Saved\\ Searches/*.savedSearch", - "postProcess": "function(i){return i.split(`\n`).map(t=>{let r=t.split(\"/\"),e=r[r.length-1];return{name:e.substring(0,e.indexOf(\".\")),displayName:e,icon:\"fig://\"+t,description:\"Smart folder\"}})}", - "trigger": "/" - } + "generatorName": "ls_library_saved_searches_savedsearch" } }, { diff --git a/command-signatures/json/meteor.json b/command-signatures/json/meteor.json index 9ac9ec0a..92047358 100644 --- a/command-signatures/json/meteor.json +++ b/command-signatures/json/meteor.json @@ -103,11 +103,7 @@ "description": "Set optional data for Meteor.settings on the server", "args": { "name": "JSON File", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:z})=>{if(o!==\"filter\"&&z===\"folder\")return o===\"always\";if(p.has(l)||n&&new RegExp(n.source,n.flags).test(l))return!0;let[,...g]=l.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(s.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!i&&!r?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?i:r)||{}))}" - } + "template": "filepaths" } }, { @@ -181,10 +177,7 @@ "description": "Example template to use", "args": { "name": "example_name", - "generators": { - "script": "meteor create --list", - "postProcess": "_NuFrRa_e=>e.split(`\n`).filter(t=>t.includes(\"github.com\")).map(t=>({name:t.split(\":\")[0].trim()}))" - } + "generatorName": "create" } }, { @@ -239,10 +232,7 @@ "args": { "name": "package_names", "isOptional": true, - "generators": { - "script": "cat ./.meteor/packages", - "postProcess": "_NuFrRa_e=>e.includes(\"No such file or directory\")?[]:e.split(`\n`).map(t=>{let a=t.replace(/#.*/g,\"\").replace(/^\\s+|\\s+$|\\s+(?=\\s)/g,\"\");return a.includes(\"@\")&&(a=a.split(\"@\").at(0)),{name:a}})" - } + "generatorName": "cat_meteor_packages" }, "options": [ { @@ -288,10 +278,7 @@ "description": "Removes a package previously added to your Meteor project. You can remove multiple packages with one command. For a list of the packages that your application is currently using, see \"meteor list\"", "args": { "name": "package", - "generators": { - "script": "cat ./.meteor/packages", - "postProcess": "_NuFrRa_e=>e.includes(\"No such file or directory\")?[]:e.split(`\n`).map(t=>{let a=t.replace(/#.*/g,\"\").replace(/^\\s+|\\s+$|\\s+(?=\\s)/g,\"\");return a.includes(\"@\")&&(a=a.split(\"@\").at(0)),{name:a}})" - } + "generatorName": "cat_meteor_packages" } }, { @@ -334,10 +321,7 @@ "description": "Removes a platform previously added to your Meteor project", "args": { "name": "platform", - "generators": { - "script": "meteor list-platforms", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(t=>({name:t}))" - } + "generatorName": "list_platforms" } }, { @@ -402,10 +386,7 @@ "name": "platforms", "isOptional": true, "isVariadic": true, - "generators": { - "script": "meteor list-platforms", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(t=>({name:t}))" - } + "generatorName": "list_platforms" } }, { @@ -483,11 +464,7 @@ "description": "Set optional data for Meteor.settings", "args": { "name": "JSON File", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:z})=>{if(o!==\"filter\"&&z===\"folder\")return o===\"always\";if(p.has(l)||n&&new RegExp(n.source,n.flags).test(l))return!0;let[,...g]=l.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(s.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!i&&!r?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?i:r)||{}))}" - } + "template": "filepaths" } }, { @@ -656,11 +633,7 @@ "description": "Set optional data for Meteor.settings on the server", "args": { "name": "JSON File", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:z})=>{if(o!==\"filter\"&&z===\"folder\")return o===\"always\";if(p.has(l)||n&&new RegExp(n.source,n.flags).test(l))return!0;let[,...g]=l.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(s.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!i&&!r?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?i:r)||{}))}" - } + "template": "filepaths" } }, { @@ -780,11 +753,7 @@ "description": "Set optional data for Meteor.settings on the server", "args": { "name": "JSON File", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:z})=>{if(o!==\"filter\"&&z===\"folder\")return o===\"always\";if(p.has(l)||n&&new RegExp(n.source,n.flags).test(l))return!0;let[,...g]=l.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(s.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!i&&!r?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?i:r)||{}))}" - } + "template": "filepaths" } }, { @@ -936,10 +905,7 @@ "description": "Publishes a new release to the package server, as determined by a JSON configuration file", "args": { "name": "JSON File", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:z})=>{if(o!==\"filter\"&&z===\"folder\")return o===\"always\";if(p.has(l)||n&&new RegExp(n.source,n.flags).test(l))return!0;let[,...g]=l.split(\".\");if(g.length>=1){let f=g.length-1,w=g[f];do{if(s.has(w))return!0;f-=1,w=[g[f],w].join(\".\")}while(f>=0)}return!1});return!i&&!r?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?i:r)||{}))}" - } + "template": "filepaths" }, "options": [ { diff --git a/command-signatures/json/mix.json b/command-signatures/json/mix.json index 6aea9165..0e07cbf7 100644 --- a/command-signatures/json/mix.json +++ b/command-signatures/json/mix.json @@ -45,10 +45,7 @@ "description": "Starts the current application and runs code", "args": { "name": "file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let a=d.filter(({name:c=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(l.has(c)||i&&new RegExp(i.source,i.flags).test(c))return!0;let[,...f]=c.split(\".\");if(f.length>=1){let m=f.length-1,x=f[m];do{if(o.has(x))return!0;m-=1,x=[f[m],x].join(\".\")}while(m>=0)}return!1});return!s&&!r?a:a.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - }, + "template": "filepaths", "isOptional": true }, "options": [ @@ -81,11 +78,7 @@ "args": { "name": "file|pattern", "description": "The file|pattern to execute", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let a=d.filter(({name:c=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(l.has(c)||i&&new RegExp(i.source,i.flags).test(c))return!0;let[,...f]=c.split(\".\");if(f.length>=1){let m=f.length-1,x=f[m];do{if(o.has(x))return!0;m-=1,x=[f[m],x].join(\".\")}while(m>=0)}return!1});return!s&&!r?a:a.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { @@ -96,11 +89,7 @@ "description": "Executes the given pattern/file", "args": { "name": "file|pattern", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let a=d.filter(({name:c=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(l.has(c)||i&&new RegExp(i.source,i.flags).test(c))return!0;let[,...f]=c.split(\".\");if(f.length>=1){let m=f.length-1,x=f[m];do{if(o.has(x))return!0;m-=1,x=[f[m],x].join(\".\")}while(m>=0)}return!1});return!s&&!r?a:a.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { @@ -144,13 +133,7 @@ "name": "task", "isOptional": true, "description": "Prints documentation for a given task", - "generators": { - "cache": { - "ttl": 10000 - }, - "script": "mix help", - "postProcess": "function O(e){return e.split(`\n`).map(A=>{let[t,i]=A.split(\"#\").map(n=>n.trim());return{name:t.replace(/^mix /,\"\"),description:i}}).filter(A=>![\"mix\",\"help\",\"new\",\"run\",\"iex -S mix\"].includes(A.name))}" - } + "generatorName": "help" }, "options": [ { @@ -171,13 +154,7 @@ "name": "task", "description": "Invokes the task (mix run) in a project", "isOptional": true, - "generators": { - "cache": { - "ttl": 10000 - }, - "script": "mix help", - "postProcess": "function O(e){return e.split(`\n`).map(A=>{let[t,i]=A.split(\"#\").map(n=>n.trim());return{name:t.replace(/^mix /,\"\"),description:i}}).filter(A=>![\"mix\",\"help\",\"new\",\"run\",\"iex -S mix\"].includes(A.name))}" - } + "generatorName": "help" }, "options": [ { diff --git a/command-signatures/json/mongosh.json b/command-signatures/json/mongosh.json index 50cdc551..a0445f67 100644 --- a/command-signatures/json/mongosh.json +++ b/command-signatures/json/mongosh.json @@ -187,9 +187,7 @@ "description": "Specifies the .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance", "args": { "name": "filePath", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } }, { @@ -197,9 +195,7 @@ "description": "Specifies the .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance", "args": { "name": "filePath", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } }, { @@ -207,9 +203,7 @@ "description": "Enables connection to a mongod or mongos that has TLS SSL support enabled", "args": { "name": "filePath", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } } ] diff --git a/command-signatures/json/mosh.json b/command-signatures/json/mosh.json index 98e9329b..e05cc5c2 100644 --- a/command-signatures/json/mosh.json +++ b/command-signatures/json/mosh.json @@ -4,19 +4,9 @@ "args": { "name": "user@hostname", "description": "Address of remote machine to log into", - "generators": [ - { - "script": "cat ~/.ssh/known_hosts", - "postProcess": "function(o,e){return o.split(`\n`).map(t=>{let n=r.exec(t);if(n)return String(n)}).filter((t,n,a)=>t&&a.indexOf(t)===n).map(t=>({name:(e[1].endsWith(\"@\")?e[1]:\"\")+t,description:\"SSH host\"}))}", - "trigger": "@" - }, - { - "script": "cat ~/.ssh/config", - "postProcess": "function(o){return o.split(`\n`).filter(e=>e.trim().startsWith(\"Host \")&&!e.includes(\"*\")).map(e=>({name:e.split(\" \")[1],description:\"SSH host\",priority:90}))}" - }, - { - "template": "history" - } + "generatorName": [ + "cat_ssh_known_hosts", + "cat_ssh_config" ] }, "options": [ diff --git a/command-signatures/json/n.json b/command-signatures/json/n.json index 3551db6a..128de5d6 100644 --- a/command-signatures/json/n.json +++ b/command-signatures/json/n.json @@ -31,10 +31,7 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": false } }, @@ -67,10 +64,7 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": false, "isVariadic": true } @@ -124,10 +118,7 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": false }, "options": [ @@ -166,10 +157,7 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": false } }, @@ -204,20 +192,13 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": false }, { "name": "node script", "isScript": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let m=d.filter(({name:l=\"\",type:R})=>{if(t!==\"filter\"&&R===\"folder\")return t===\"always\";if(r.has(l)||a&&new RegExp(a.source,a.flags).test(l))return!0;let[,...g]=l.split(\".\");if(g.length>=1){let h=g.length-1,y=g[h];do{if(c.has(y))return!0;h-=1,y=[g[h],y].join(\".\")}while(h>=0)}return!1});return!o&&!s?m:m.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" } ], "options": [ @@ -307,10 +288,7 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": false }, { @@ -347,10 +325,7 @@ "description": "Read version from package.json" } ], - "generators": { - "script": "n lsr --all", - "postProcess": "function(e){let n=new Set,i=e.split(`\n`).slice(1);for(let a of i){n.add(a);let t=a.split(\".\");n.add(t[0]+\".\"+t[1]),n.add(t[0])}return Array.from(n).map(a=>({name:[a,`v${a}`],description:`Node.js ${a}`}))}" - }, + "generatorName": "lsr", "isOptional": true }, "options": [ diff --git a/command-signatures/json/nativescript.json b/command-signatures/json/nativescript.json index 8ad4c20f..dc169d36 100644 --- a/command-signatures/json/nativescript.json +++ b/command-signatures/json/nativescript.json @@ -237,13 +237,7 @@ "description": "Create a project using a predefined template", "args": { "name": "template", - "generators": { - "script": "curl https://api.github.com/repos/NativeScript/nativescript-app-templates/contents/packages", - "cache": { - "ttl": 8640000000 - }, - "postProcess": "_NuFrRa_r=>JSON.parse(r).map(s=>{let g=s==null?void 0:s.name;return{name:`@nativescript/${g}`,description:`Template ${g}`}})" - } + "generatorName": "curl_https_api_github_com_repos_nativescript_nativescript_app_templates_contents_packages" } }, { diff --git a/command-signatures/json/networkQuality.json b/command-signatures/json/networkQuality.json index fb399a4b..1a485eab 100644 --- a/command-signatures/json/networkQuality.json +++ b/command-signatures/json/networkQuality.json @@ -30,10 +30,7 @@ "description": "Bind test to interface", "args": { "name": "interface", - "generators": { - "script": "networksetup -listallhardwareports", - "postProcess": "_NuFrRa_n=>{let e=[],o=new RegExp(\"^Hardware Port: (.*?)\\\\n.*?Device: (.*?)$\",\"gms\");for(let t of n.matchAll(o))e.push({name:t[2],description:t[1]});return e}" - } + "generatorName": "networksetup" } } ] diff --git a/command-signatures/json/ni.json b/command-signatures/json/ni.json index 6d344848..ce537e2b 100644 --- a/command-signatures/json/ni.json +++ b/command-signatures/json/ni.json @@ -41,14 +41,7 @@ ], "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_(n,a)=>a.startsWith(\"@\")?!(S(a)>1&&S(n)>1):!(a.includes(\"@\")&&n.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(n,a)=>D(void 0,null,function*(){let e=n[n.length-1];if(e===\"\")return[];let d=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${e}\"`,m=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${e.slice(0,-1)}`,l=s=>s[s.length-1]===\"@\"?a(m):a(d),g=e.startsWith(\"@\")?S(e)>1:e.includes(\"@\");try{let s=JSON.parse(yield l(e));if(g){let o=Object.entries(s[\"dist-tags\"]||{}).map(([p,j])=>({name:p,description:j}));return o.push(...Object.keys(s.versions).map(p=>({name:p})).reverse()),o}return s.results.map(o=>({name:o.package.name,description:o.package.description}))}catch(s){return console.error({error:s}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true } diff --git a/command-signatures/json/node.json b/command-signatures/json/node.json index 31993c8b..527da22c 100644 --- a/command-signatures/json/node.json +++ b/command-signatures/json/node.json @@ -1,13 +1,11 @@ { "name": "node", "description": "Run the node interpreter", + "generateSpec": "_NuFrRa_(e,n)=>x(void 0,null,function*(){if((yield n(\"test -f .adonisrc.json && echo '1'\"))===\"1\")return{name:\"node\",subcommands:[{name:\"ace\",description:\"Run AdonisJS command-line\",options:[{name:[\"-h\",\"--help\"],description:\"Display AdonisJS Ace help\"},{name:[\"-v\",\"--version\"],description:\"Display AdonisJS version\"}],subcommands:[{name:\"build\",description:\"Compile project from Typescript to Javascript. Also compiles the frontend assets if using webpack encore\",options:[{name:[\"-prod\",\"--production\"],description:\"Build for production\"},{name:\"--assets\",description:\"Build frontend assets when webpack encore is installed\"},{name:\"--no-assets\",description:\"Disable building assets\"},{name:\"--ignore-ts-errors\",description:\"Ignore typescript errors and complete the build process\"},{name:\"--tsconfig\",description:\"Path to the TypeScript project configuration file\",args:{name:\"path\",description:\"Path to tsconfig.json\"}},{name:\"--encore-args\",requiresSeparator:!0,insertValue:\"--encore-args='{cursor}'\",description:\"CLI options to pass to the encore command line\"},{name:\"--client\",args:{name:\"name\"},description:\"Select the package manager to decide which lock file to copy to the build folder\"}]},{name:[\"configure\",\"invoke\"],description:\"Configure a given AdonisJS package\",args:{name:\"name\",description:\"Name of the package you want to configure\"},subcommands:[{name:\"@adonisjs/auth\",description:\"Trigger auto configuring auth package\"},{name:\"@adonisjs/shield\",description:\"Trigger auto configuring shield package\"},{name:\"@adonisjs/redis\",description:\"Trigger auto configuring redis package\"},{name:\"@adonisjs/mail\",description:\"Trigger auto configuring mail package\"}]},{name:\"repl\",description:\"Start a new REPL session\"},{name:\"serve\",description:\"Start the AdonisJS HTTP server, along with the file watcher. Also starts the webpack dev server when webpack encore is installed\",options:[{name:\"--assets\",description:\"Start webpack dev server when encore is installed\"},{name:\"--no-assets\",description:\"Disable webpack dev server\"},{name:[\"-w\",\"--watch\"],description:\"Watch for file changes and re-start the HTTP server on change\"},{name:[\"-p\",\"--poll\"],description:\"Detect file changes by polling files instead of listening to filesystem events\"},{name:\"--node-args\",requiresSeparator:!0,insertValue:\"--node-args='{cursor}'\",description:\"CLI options to pass to the node command line\"},{name:\"--encore-args\",requiresSeparator:!0,insertValue:\"--encore-args='{cursor}'\",description:\"CLI options to pass to the encore command line\"}]},{name:\"db:seed\",description:\"Execute database seeder files\",options:[{name:[\"-c\",\"--connection\"],description:\"Define a custom database connection for the seeders\",args:{name:\"name\"}},{name:[\"-i\",\"--interactive\"],description:\"Run seeders in interactive mode\"},{name:[\"-f\",\"--files\"],args:{name:\"file\",isVariadic:!0,template:\"filepaths\"},description:\"Define a custom set of seeders files names to run\"}]},{name:\"dump:rcfile\",description:\"Dump contents of .adonisrc.json file along with defaults\"},{name:\"generate:key\",description:\"Generate a new APP_KEY secret\"},{name:\"generate:manifest\",description:\"Generate ace commands manifest file. Manifest file speeds up commands lookup\"},{name:\"list:routes\",description:\"List application routes\"},{name:\"make:command\",description:\"Make a new ace command\"},{name:\"make:controller\",description:\"Make a new HTTP controller\",args:{name:\"name\",description:\"Name of the controller class\"},options:[{name:[\"-r\",\"--resource\"],description:\"Add resourceful methods to the controller class\"},{name:[\"-e\",\"--exact\"],description:\"Create the controller with the exact name as provided\"}]},{name:\"make:exception\",description:\"Make a new custom exception class\"},{name:\"make:listener\",description:\"Make a new event listener class\"},{name:\"make:mailer\",description:\"Make a new mailer class\",args:{name:\"name\",description:\"Mailer class name\"}},{name:\"make:middleware\",description:\"Make a new middleware\",args:{name:\"name\",description:\"Middleware class name\"}},{name:\"make:migration\",description:\"Make a new migration file\",args:{name:\"name\",description:\"Name of the migration file\"},options:[{name:\"--connection\",description:\"The connection flag is used to lookup the directory for the migration file\",args:{name:\"name\"}},{name:\"--folder\",description:\"Pre-select a migration directory\",args:{name:\"name\",template:\"filepaths\"}},{name:\"--create\",description:\"Define the table name for creating a new table\",args:{name:\"name\"}},{name:\"--table\",description:\"Define the table name for altering an existing table\",args:{name:\"name\"}}]},{name:\"make:model\",description:\"Make a new Lucid model\",args:{name:\"name\",description:\"Name of the model class\"},options:[{name:[\"-m\",\"--migration\"],description:\"Generate the migration for the model\"},{name:[\"-c\",\"--controller\"],description:\"Generate the controller for the model\"}]},{name:\"make:prldfile\",description:\"Make a new preload file\",subcommands:[{name:\"events\",description:\"Make events preload file\"}]},{name:\"make:provider\",description:\"Make a new provider class\"},{name:\"make:seeder\",description:\"Make a new Seeder file\",args:{name:\"name\",description:\"Name of the seeder class\"}},{name:\"make:validator\",description:\"Make a new validator\",args:{name:\"name\",description:\"Name of the validator class\"},options:[{name:[\"-e\",\"--exact\"],description:\"Create the validator with the exact name as provided\"}]},{name:\"make:view\",description:\"Make a new view template\",args:{name:\"name\",description:\"Name of the view\"},options:[{name:[\"-e\",\"--exact\"],description:\"Create the template file with the exact name as provided\"}]},{name:\"migration:rollback\",description:\"Rollback migrations to a given batch number\",options:[{name:[\"-c\",\"--connection\"],description:\"Define a custom database connection\",args:{name:\"name\"}},{name:\"--force\",description:\"Explicitly force to run migrations in production\",isDangerous:!0},{name:\"--dry-run\",description:\"Print SQL queries, instead of running the migrations\"},{name:\"--batch\",args:{name:\"number\",description:\"Use 0 to rollback to initial state\"},description:\"Define custom batch number for rollback\"}]},{name:\"migration:run\",description:\"Run pending migrations\",options:[{name:[\"-c\",\"--connection\"],description:\"Define a custom database connection\",args:{name:\"name\"}},{name:\"--force\",description:\"Explicitly force to run migrations in production\",isDangerous:!0},{name:\"--dry-run\",description:\"Print SQL queries, instead of running the migrations\"}]},{name:\"migration:status\",description:\"Check migrations current status\"}]}]}})", "args": { "name": "node script", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateName": "filter-node-files" - } + "template": "filepaths" }, "options": [ { @@ -67,6 +65,5 @@ "name": "--preserve-symlinks", "description": "Follows symlinks to directories when examining source code and templates for translation strings" } - ], - "generateSpec": "_NuFrRa_(e,n)=>x(void 0,null,function*(){if((yield n(\"test -f .adonisrc.json && echo '1'\"))===\"1\")return{name:\"node\",subcommands:[{name:\"ace\",description:\"Run AdonisJS command-line\",options:[{name:[\"-h\",\"--help\"],description:\"Display AdonisJS Ace help\"},{name:[\"-v\",\"--version\"],description:\"Display AdonisJS version\"}],subcommands:[{name:\"build\",description:\"Compile project from Typescript to Javascript. Also compiles the frontend assets if using webpack encore\",options:[{name:[\"-prod\",\"--production\"],description:\"Build for production\"},{name:\"--assets\",description:\"Build frontend assets when webpack encore is installed\"},{name:\"--no-assets\",description:\"Disable building assets\"},{name:\"--ignore-ts-errors\",description:\"Ignore typescript errors and complete the build process\"},{name:\"--tsconfig\",description:\"Path to the TypeScript project configuration file\",args:{name:\"path\",description:\"Path to tsconfig.json\"}},{name:\"--encore-args\",requiresSeparator:!0,insertValue:\"--encore-args='{cursor}'\",description:\"CLI options to pass to the encore command line\"},{name:\"--client\",args:{name:\"name\"},description:\"Select the package manager to decide which lock file to copy to the build folder\"}]},{name:[\"configure\",\"invoke\"],description:\"Configure a given AdonisJS package\",args:{name:\"name\",description:\"Name of the package you want to configure\"},subcommands:[{name:\"@adonisjs/auth\",description:\"Trigger auto configuring auth package\"},{name:\"@adonisjs/shield\",description:\"Trigger auto configuring shield package\"},{name:\"@adonisjs/redis\",description:\"Trigger auto configuring redis package\"},{name:\"@adonisjs/mail\",description:\"Trigger auto configuring mail package\"}]},{name:\"repl\",description:\"Start a new REPL session\"},{name:\"serve\",description:\"Start the AdonisJS HTTP server, along with the file watcher. Also starts the webpack dev server when webpack encore is installed\",options:[{name:\"--assets\",description:\"Start webpack dev server when encore is installed\"},{name:\"--no-assets\",description:\"Disable webpack dev server\"},{name:[\"-w\",\"--watch\"],description:\"Watch for file changes and re-start the HTTP server on change\"},{name:[\"-p\",\"--poll\"],description:\"Detect file changes by polling files instead of listening to filesystem events\"},{name:\"--node-args\",requiresSeparator:!0,insertValue:\"--node-args='{cursor}'\",description:\"CLI options to pass to the node command line\"},{name:\"--encore-args\",requiresSeparator:!0,insertValue:\"--encore-args='{cursor}'\",description:\"CLI options to pass to the encore command line\"}]},{name:\"db:seed\",description:\"Execute database seeder files\",options:[{name:[\"-c\",\"--connection\"],description:\"Define a custom database connection for the seeders\",args:{name:\"name\"}},{name:[\"-i\",\"--interactive\"],description:\"Run seeders in interactive mode\"},{name:[\"-f\",\"--files\"],args:{name:\"file\",isVariadic:!0,template:\"filepaths\"},description:\"Define a custom set of seeders files names to run\"}]},{name:\"dump:rcfile\",description:\"Dump contents of .adonisrc.json file along with defaults\"},{name:\"generate:key\",description:\"Generate a new APP_KEY secret\"},{name:\"generate:manifest\",description:\"Generate ace commands manifest file. Manifest file speeds up commands lookup\"},{name:\"list:routes\",description:\"List application routes\"},{name:\"make:command\",description:\"Make a new ace command\"},{name:\"make:controller\",description:\"Make a new HTTP controller\",args:{name:\"name\",description:\"Name of the controller class\"},options:[{name:[\"-r\",\"--resource\"],description:\"Add resourceful methods to the controller class\"},{name:[\"-e\",\"--exact\"],description:\"Create the controller with the exact name as provided\"}]},{name:\"make:exception\",description:\"Make a new custom exception class\"},{name:\"make:listener\",description:\"Make a new event listener class\"},{name:\"make:mailer\",description:\"Make a new mailer class\",args:{name:\"name\",description:\"Mailer class name\"}},{name:\"make:middleware\",description:\"Make a new middleware\",args:{name:\"name\",description:\"Middleware class name\"}},{name:\"make:migration\",description:\"Make a new migration file\",args:{name:\"name\",description:\"Name of the migration file\"},options:[{name:\"--connection\",description:\"The connection flag is used to lookup the directory for the migration file\",args:{name:\"name\"}},{name:\"--folder\",description:\"Pre-select a migration directory\",args:{name:\"name\",template:\"filepaths\"}},{name:\"--create\",description:\"Define the table name for creating a new table\",args:{name:\"name\"}},{name:\"--table\",description:\"Define the table name for altering an existing table\",args:{name:\"name\"}}]},{name:\"make:model\",description:\"Make a new Lucid model\",args:{name:\"name\",description:\"Name of the model class\"},options:[{name:[\"-m\",\"--migration\"],description:\"Generate the migration for the model\"},{name:[\"-c\",\"--controller\"],description:\"Generate the controller for the model\"}]},{name:\"make:prldfile\",description:\"Make a new preload file\",subcommands:[{name:\"events\",description:\"Make events preload file\"}]},{name:\"make:provider\",description:\"Make a new provider class\"},{name:\"make:seeder\",description:\"Make a new Seeder file\",args:{name:\"name\",description:\"Name of the seeder class\"}},{name:\"make:validator\",description:\"Make a new validator\",args:{name:\"name\",description:\"Name of the validator class\"},options:[{name:[\"-e\",\"--exact\"],description:\"Create the validator with the exact name as provided\"}]},{name:\"make:view\",description:\"Make a new view template\",args:{name:\"name\",description:\"Name of the view\"},options:[{name:[\"-e\",\"--exact\"],description:\"Create the template file with the exact name as provided\"}]},{name:\"migration:rollback\",description:\"Rollback migrations to a given batch number\",options:[{name:[\"-c\",\"--connection\"],description:\"Define a custom database connection\",args:{name:\"name\"}},{name:\"--force\",description:\"Explicitly force to run migrations in production\",isDangerous:!0},{name:\"--dry-run\",description:\"Print SQL queries, instead of running the migrations\"},{name:\"--batch\",args:{name:\"number\",description:\"Use 0 to rollback to initial state\"},description:\"Define custom batch number for rollback\"}]},{name:\"migration:run\",description:\"Run pending migrations\",options:[{name:[\"-c\",\"--connection\"],description:\"Define a custom database connection\",args:{name:\"name\"}},{name:\"--force\",description:\"Explicitly force to run migrations in production\",isDangerous:!0},{name:\"--dry-run\",description:\"Print SQL queries, instead of running the migrations\"}]},{name:\"migration:status\",description:\"Check migrations current status\"}]}]}})" + ] } diff --git a/command-signatures/json/npm.json b/command-signatures/json/npm.json index 50e21733..ea812537 100644 --- a/command-signatures/json/npm.json +++ b/command-signatures/json/npm.json @@ -372,14 +372,7 @@ "args": { "name": "package", "isOptional": true, - "generators": { - "trigger": "_NuFrRa_(n,a)=>a.startsWith(\"@\")?!(S(a)>1&&S(n)>1):!(a.includes(\"@\")&&n.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(n,a)=>D(void 0,null,function*(){let e=n[n.length-1];if(e===\"\")return[];let d=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${e}\"`,m=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${e.slice(0,-1)}`,l=s=>s[s.length-1]===\"@\"?a(m):a(d),g=e.startsWith(\"@\")?S(e)>1:e.includes(\"@\");try{let s=JSON.parse(yield l(e));if(g){let o=Object.entries(s[\"dist-tags\"]||{}).map(([p,j])=>({name:p,description:j}));return o.push(...Object.keys(s.versions).map(p=>({name:p})).reverse()),o}return s.results.map(o=>({name:o.package.name,description:o.package.description}))}catch(s){return console.error({error:s}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true }, @@ -562,10 +555,7 @@ ], "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - } + "template": "filepaths" } } ] @@ -607,14 +597,7 @@ "args": { "name": "package", "isOptional": true, - "generators": { - "trigger": "_NuFrRa_(n,a)=>a.startsWith(\"@\")?!(S(a)>1&&S(n)>1):!(a.includes(\"@\")&&n.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(n,a)=>D(void 0,null,function*(){let e=n[n.length-1];if(e===\"\")return[];let d=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${e}\"`,m=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${e.slice(0,-1)}`,l=s=>s[s.length-1]===\"@\"?a(m):a(d),g=e.startsWith(\"@\")?S(e)>1:e.includes(\"@\");try{let s=JSON.parse(yield l(e));if(g){let o=Object.entries(s[\"dist-tags\"]||{}).map(([p,j])=>({name:p,description:j}));return o.push(...Object.keys(s.versions).map(p=>({name:p})).reverse()),o}return s.results.map(o=>({name:o.package.name,description:o.package.description}))}catch(s){return console.error({error:s}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true }, @@ -692,10 +675,7 @@ "description": "Browse an installed package", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - } + "template": "filepaths" } }, { @@ -1657,14 +1637,7 @@ "args": { "name": "package", "isOptional": true, - "generators": { - "trigger": "_NuFrRa_(n,a)=>a.startsWith(\"@\")?!(S(a)>1&&S(n)>1):!(a.includes(\"@\")&&n.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(n,a)=>D(void 0,null,function*(){let e=n[n.length-1];if(e===\"\")return[];let d=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${e}\"`,m=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${e.slice(0,-1)}`,l=s=>s[s.length-1]===\"@\"?a(m):a(d),g=e.startsWith(\"@\")?S(e)>1:e.includes(\"@\");try{let s=JSON.parse(yield l(e));if(g){let o=Object.entries(s[\"dist-tags\"]||{}).map(([p,j])=>({name:p,description:j}));return o.push(...Object.keys(s.versions).map(p=>({name:p})).reverse()),o}return s.results.map(o=>({name:o.package.name,description:o.package.description}))}catch(s){return console.error({error:s}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true }, @@ -2197,10 +2170,7 @@ "description": "Uninstall a package", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - }, + "template": "filepaths", "isVariadic": true }, "options": [ @@ -2262,10 +2232,7 @@ "description": "Uninstall a package", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - }, + "template": "filepaths", "isVariadic": true }, "options": [ @@ -2324,10 +2291,7 @@ "description": "Uninstall a package", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - }, + "template": "filepaths", "isVariadic": true }, "options": [ @@ -2386,10 +2350,7 @@ "description": "Uninstall a package", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - }, + "template": "filepaths", "isVariadic": true }, "options": [ @@ -2448,10 +2409,7 @@ "description": "Uninstall a package", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return D(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let m=yield a(\"cat $(npm prefix)/package.json\"),l=JSON.parse(m),g=(e=l.dependencies)!=null?e:{},s=l.devDependencies,o=(d=l.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(F=>F===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(l=>({name:l,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - }, + "template": "filepaths", "isVariadic": true }, "options": [ diff --git a/command-signatures/json/npx.json b/command-signatures/json/npx.json index 0f082bf9..b6b71fcc 100644 --- a/command-signatures/json/npx.json +++ b/command-signatures/json/npx.json @@ -4,10 +4,7 @@ "args": { "name": "command", "isCommand": true, - "generators": { - "script": "until [[ -d node_modules/ ]] || [[ $PWD = '/' ]]; do cd ..; done; ls -1 node_modules/.bin/", - "postProcess": "function(t){let i=[...n].reduce((e,{name:a})=>[...e,a],[]);return t.split(`\n`).filter(e=>!i.includes(e)).map(e=>({name:e,icon:\"fig://icon?type=command\",loadSpec:e}))}" - }, + "generatorName": "until_node_modules_do_cd", "suggestions": [ { "name": "vite" diff --git a/command-signatures/json/nr.json b/command-signatures/json/nr.json index 751edaae..3986da6f 100644 --- a/command-signatures/json/nr.json +++ b/command-signatures/json/nr.json @@ -13,14 +13,7 @@ "args": { "name": "script", "description": "The script to run", - "generators": { - "cache": { - "strategy": "stale-while-revalidate", - "cacheByDirectory": true - }, - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(n,[a]){if(n.trim()==\"\")return[];try{let e=JSON.parse(n),d=e.scripts,m=e.fig||{};if(d)return Object.entries(d).map(([l,g])=>{let s=a===\"yarn\"?\"fig://icon?type=yarn\":\"fig://icon?type=npm\",o=m[l];return F({name:l,icon:s,description:g},o)})}catch(e){console.error(e)}return[]}" - } + "generatorName": "until_package_json_do_cd" }, "additionalSuggestions": [ { diff --git a/command-signatures/json/nrm.json b/command-signatures/json/nrm.json index b1229e7a..95f732ce 100644 --- a/command-signatures/json/nrm.json +++ b/command-signatures/json/nrm.json @@ -32,10 +32,7 @@ ], "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_n=>n===\"-g\"||n===\"--global\"", - "custom": "function(n,a){return S(this,null,function*(){var e,d;if(!n.includes(\"-g\")&&!n.includes(\"--global\")){let l=yield a(\"cat $(npm prefix)/package.json\"),m=JSON.parse(l),g=(e=m.dependencies)!=null?e:{},s=m.devDependencies,o=(d=m.optionalDependencies)!=null?d:{};return Object.assign(g,s,o),Object.keys(g).filter(p=>!n.some(T=>T===p)).map(p=>({name:p,icon:\"\\u{1F4E6}\",description:g[p]?\"dependency\":o[p]?\"optionalDependency\":\"devDependency\"}))}else return(yield a(\"ls -1 `npm root -g`\")).split(`\n`).map(m=>({name:m,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - }, + "template": "filepaths", "isVariadic": true } } diff --git a/command-signatures/json/ns.json b/command-signatures/json/ns.json index 8ad4c20f..dc169d36 100644 --- a/command-signatures/json/ns.json +++ b/command-signatures/json/ns.json @@ -237,13 +237,7 @@ "description": "Create a project using a predefined template", "args": { "name": "template", - "generators": { - "script": "curl https://api.github.com/repos/NativeScript/nativescript-app-templates/contents/packages", - "cache": { - "ttl": 8640000000 - }, - "postProcess": "_NuFrRa_r=>JSON.parse(r).map(s=>{let g=s==null?void 0:s.name;return{name:`@nativescript/${g}`,description:`Template ${g}`}})" - } + "generatorName": "curl_https_api_github_com_repos_nativescript_nativescript_app_templates_contents_packages" } }, { diff --git a/command-signatures/json/nx.json b/command-signatures/json/nx.json index 9c75ef41..a39e449a 100644 --- a/command-signatures/json/nx.json +++ b/command-signatures/json/nx.json @@ -227,14 +227,7 @@ "name": "generate", "description": "Run a generator", "args": { - "generators": { - "script": "_NuFrRa_n=>{let e=n.slice(-1)[0];return e.indexOf(\":\")>-1?`nx list ${e.split(\":\")[0]}`:\"nx list\"}", - "trigger": ":", - "cache": { - "ttl": 86400 - }, - "postProcess": "_NuFrRa_(n,e)=>{if(n.indexOf(\"Installed plugins\")>-1){let i=n.split(\">\")[1].split(`\n`).filter(Boolean);return i.shift(),i.map(t=>t.trim().split(\" \")[0]).map(t=>({name:t,type:\"option\"}))}else if(n.indexOf(\"Capabilities\")>-1){let a=e.slice(-1)[0];return n.split(`\n`).filter(t=>t.trim().indexOf(\" : \")>-1).map(t=>a+t.trim().split(\" : \")[0]).map(t=>({name:t,type:\"option\"}))}}" - }, + "template": "filepaths", "name": "collection:generator" }, "options": [ diff --git a/command-signatures/json/oc.json b/command-signatures/json/oc.json index 2cea187d..498661a0 100644 --- a/command-signatures/json/oc.json +++ b/command-signatures/json/oc.json @@ -1212,10 +1212,7 @@ "description": "Container name. If omitted, the first container in the pod will be chosen", "args": { "name": "Container", - "generators": { - "script": "_NuFrRa_r=>{let i=r.findIndex(c=>c===\"pods\"||c.includes(\"pods/\")||c===\"pod\"||c.includes(\"pod/\"));return`kubectl get ${r[i].includes(\"/\")?r[i]:`${r[i]} + ${r[i+1]}`} -o json`}", - "postProcess": "function(r){return s.connectedToCluster(r)||s.generalError(r)?[]:JSON.parse(r).spec.containers.map(i=>({name:i.name,description:i.image,icon:\"fig://icon?type=kubernetes\"}))}" - } + "template": "filepaths" } }, { @@ -2750,10 +2747,7 @@ "description": "The name of the resource to create a Job from (only cronjob is supported)", "args": { "name": "Cronjob", - "generators": { - "script": "_NuFrRa_()=>o.typeWithoutName(\"cronjob\")", - "postProcess": "_NuFrRa_(r,i)=>n(r,i).map(a=>l(u({},a),{name:`cronjob/${a.name}`}))" - } + "template": "filepaths" } }, { @@ -4496,10 +4490,7 @@ "description": "Container name. If omitted, the first container in the pod will be chosen", "args": { "name": "Container", - "generators": { - "script": "_NuFrRa_r=>{let i=r.findIndex(c=>c===\"pods\"||c.includes(\"pods/\")||c===\"pod\"||c.includes(\"pod/\"));return`kubectl get ${r[i].includes(\"/\")?r[i]:`${r[i]} + ${r[i+1]}`} -o json`}", - "postProcess": "function(r){return s.connectedToCluster(r)||s.generalError(r)?[]:JSON.parse(r).spec.containers.map(i=>({name:i.name,description:i.image,icon:\"fig://icon?type=kubernetes\"}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/okteto.json b/command-signatures/json/okteto.json index 07fc4572..0006ca36 100644 --- a/command-signatures/json/okteto.json +++ b/command-signatures/json/okteto.json @@ -388,13 +388,7 @@ "name": "delete", "description": "Delete a context", "args": { - "generators": { - "script": "okteto context list", - "cache": { - "ttl": 1800000 - }, - "postProcess": "_NuFrRa_t=>t.split(`\n`).slice(1).map((e,n)=>(e=e.split(\" \")[0],{name:e.replace(\"*\",\"\").trim(),description:\"Context\",icon:\"fig://icon?type=okteto\"}))" - } + "generatorName": "context_list" }, "options": [ { @@ -514,13 +508,7 @@ "name": "use", "description": "Set the default context", "args": { - "generators": { - "script": "okteto context list", - "cache": { - "ttl": 1800000 - }, - "postProcess": "_NuFrRa_t=>t.split(`\n`).slice(1).map((e,n)=>(e=e.split(\" \")[0],{name:e.replace(\"*\",\"\").trim(),description:\"Context\",icon:\"fig://icon?type=okteto\"}))" - } + "generatorName": "context_list" }, "options": [ { @@ -1069,13 +1057,7 @@ "name": "delete", "description": "Delete a namespace", "args": { - "generators": { - "script": "okteto namespace list", - "cache": { - "ttl": 1800000 - }, - "postProcess": "_NuFrRa_t=>t.split(`\n`).slice(1).map((e,n)=>(e=e.split(\" \")[0],{name:e.replace(\"*\",\"\").trim(),description:\"Namespace\",icon:\"fig://icon?type=okteto\"}))" - } + "generatorName": "namespace_list" }, "options": [ { @@ -1160,13 +1142,7 @@ ], "description": "Configure the current namespace of the okteto context", "args": { - "generators": { - "script": "okteto namespace list", - "cache": { - "ttl": 1800000 - }, - "postProcess": "_NuFrRa_t=>t.split(`\n`).slice(1).map((e,n)=>(e=e.split(\" \")[0],{name:e.replace(\"*\",\"\").trim(),description:\"Namespace\",icon:\"fig://icon?type=okteto\"}))" - } + "generatorName": "namespace_list" }, "options": [ { diff --git a/command-signatures/json/op.json b/command-signatures/json/op.json index 60f1b820..44cedaf1 100644 --- a/command-signatures/json/op.json +++ b/command-signatures/json/op.json @@ -1306,10 +1306,7 @@ "isPersistent": true, "args": { "name": "account", - "generators": { - "script": "op account list --format json", - "postProcess": "_NuFrRa_t=>JSON.parse(t).map(n=>({name:n.email,description:n.url,insertValue:n.account_uuid,icon:e}))" - } + "generatorName": "account_list_json" } }, { diff --git a/command-signatures/json/open.json b/command-signatures/json/open.json index de5f31b3..d10fbacf 100644 --- a/command-signatures/json/open.json +++ b/command-signatures/json/open.json @@ -7,13 +7,7 @@ "description": "Specify the application to use for opening the file", "args": { "name": "Application", - "generators": { - "cache": { - "strategy": "stale-while-revalidate" - }, - "script": "mdfind kMDItemContentTypeTree=com.apple.application-bundle -onlyin /", - "postProcess": "_NuFrRa_s=>s.split(`\n`).map(e=>{let t=e.slice(e.lastIndexOf(\"/\")+1);return{name:t,description:e,icon:`fig://${e}`,priority:e.endsWith(`/Applications/${t}`)?80:e.startsWith(\"/Applications\")?76:50}})" - } + "generatorName": "mdfind" } }, { @@ -21,14 +15,7 @@ "description": "Specify the bundle identifier of the app to use to open the file", "args": { "name": "Bundle Identifier", - "generators": { - "scriptTimeout": 15000, - "cache": { - "strategy": "stale-while-revalidate" - }, - "script": "mdfind kMDItemContentTypeTree=com.apple.application-bundle -onlyin / | while read line; do echo $(mdls -name kMDItemCFBundleIdentifier -r \"$line\") $line; done", - "postProcess": "_NuFrRa_s=>{let e=new Map(s.split(`\n`).map(n=>{let i=n.indexOf(\" \");return[n.slice(0,i),n.slice(i+1)]}));e.delete(\"(null)\");let t=[];for(let[n,i]of e.entries())t.push({name:n,description:i,icon:`fig://${i}`});return t}" - } + "generatorName": "mdfind_while_read_line" } }, { diff --git a/command-signatures/json/osascript.json b/command-signatures/json/osascript.json index 2926ebef..3b535533 100644 --- a/command-signatures/json/osascript.json +++ b/command-signatures/json/osascript.json @@ -51,9 +51,6 @@ "name": "script", "isScript": true, "isOptional": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let u=p.filter(({name:a=\"\",type:V})=>{if(i!==\"filter\"&&V===\"folder\")return i===\"always\";if(f.has(a)||r&&new RegExp(r.source,r.flags).test(a))return!0;let[,...g]=a.split(\".\");if(g.length>=1){let h=g.length-1,S=g[h];do{if(c.has(S))return!0;h-=1,S=[g[h],S].join(\".\")}while(h>=0)}return!1});return!s&&!o?u:u.map(a=>Object.assign(Object.assign({},a),(a.type===\"file\"?s:o)||{}))}" - } + "template": "filepaths" } } diff --git a/command-signatures/json/pandoc.json b/command-signatures/json/pandoc.json index 2817f4b5..def83fe7 100644 --- a/command-signatures/json/pandoc.json +++ b/command-signatures/json/pandoc.json @@ -12,10 +12,7 @@ "description": "Specify input format", "args": { "name": "format", - "generators": { - "script": "pandoc --list-input-formats", - "postProcess": "function(e){return e.split(`\n`).map(t=>({name:t,icon:`fig://icon?type=${t}`}))}" - } + "generatorName": "completions_list" } }, { @@ -28,10 +25,7 @@ "description": "Specify output format", "args": { "name": "format", - "generators": { - "script": "pandoc --list-output-formats", - "postProcess": "function(e){return e.split(`\n`).map(t=>({name:t,icon:`fig://icon?type=${t}`}))}" - } + "generatorName": "completions" } }, { @@ -61,10 +55,7 @@ "description": "Specify a set of default option settings", "args": { "name": "file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:R})=>{if(n!==\"filter\"&&R===\"folder\")return n===\"always\";if(c.has(l)||a&&new RegExp(a.source,a.flags).test(l))return!0;let[,...h]=l.split(\".\");if(h.length>=1){let g=h.length-1,v=h[g];do{if(r.has(v))return!0;g-=1,v=[h[g],v].join(\".\")}while(g>=0)}return!1});return!s&&!o?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?s:o)||{}))}" - } + "template": "filepaths" } }, { @@ -104,10 +95,7 @@ "description": "List supported extensions for FORMAT, one per line, preceded by a + or - indicating whether it is enabled by default in FORMAT", "args": { "name": "format", - "generators": { - "script": "pandoc --list-input-formats && pandoc --list-output-formats", - "postProcess": "function(e){return Array.from(new Set(e.split(`\n`))).map(i=>({name:i,icon:`fig://icon?type=${i}`}))}" - }, + "generatorName": "pandoc", "isOptional": true } }, @@ -196,10 +184,7 @@ "description": "Read metadata from the supplied YAML (or JSON) file", "args": { "name": "file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:l=\"\",type:R})=>{if(n!==\"filter\"&&R===\"folder\")return n===\"always\";if(c.has(l)||a&&new RegExp(a.source,a.flags).test(l))return!0;let[,...h]=l.split(\".\");if(h.length>=1){let g=h.length-1,v=h[g];do{if(r.has(v))return!0;g-=1,v=[h[g],v].join(\".\")}while(g>=0)}return!1});return!s&&!o?d:d.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?s:o)||{}))}" - } + "template": "filepaths" } }, { @@ -289,10 +274,7 @@ "description": "Print the system default template for an output FORMAT. Templates in the user data directory are ignored", "args": { "name": "format", - "generators": { - "script": "pandoc --list-output-formats", - "postProcess": "function(e){return e.split(`\n`).map(t=>({name:t,icon:`fig://icon?type=${t}`}))}" - } + "generatorName": "completions" } }, { diff --git a/command-signatures/json/pdfunite.json b/command-signatures/json/pdfunite.json index d2a39faa..545e8037 100644 --- a/command-signatures/json/pdfunite.json +++ b/command-signatures/json/pdfunite.json @@ -16,10 +16,7 @@ } ], "args": { - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let s=h.filter(({name:f=\"\",type:P})=>{if(i!==\"filter\"&&P===\"folder\")return i===\"always\";if(l.has(f)||r&&new RegExp(r.source,r.flags).test(f))return!0;let[,...p]=f.split(\".\");if(p.length>=1){let g=p.length-1,w=p[g];do{if(c.has(w))return!0;g-=1,w=[p[g],w].join(\".\")}while(g>=0)}return!1});return!o&&!u?s:s.map(f=>Object.assign(Object.assign({},f),(f.type===\"file\"?o:u)||{}))}" - }, + "template": "filepaths", "isVariadic": true } } diff --git a/command-signatures/json/pm2.json b/command-signatures/json/pm2.json index aa0def8c..77e9c720 100644 --- a/command-signatures/json/pm2.json +++ b/command-signatures/json/pm2.json @@ -426,10 +426,7 @@ "description": "Start or restart JSON file", "args": { "name": "json", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let p=h.filter(({name:c=\"\",type:J})=>{if(i!==\"filter\"&&J===\"folder\")return i===\"always\";if(l.has(c)||a&&new RegExp(a.source,a.flags).test(c))return!0;let[,...b]=c.split(\".\");if(b.length>=1){let w=b.length-1,j=b[w];do{if(o.has(j))return!0;w-=1,j=[b[w],j].join(\".\")}while(w>=0)}return!1});return!r&&!s?p:p.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?r:s)||{}))}" - } + "template": "filepaths" } }, { @@ -437,10 +434,7 @@ "description": "Start or gracefully reload JSON file", "args": { "name": "json", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let p=h.filter(({name:c=\"\",type:J})=>{if(i!==\"filter\"&&J===\"folder\")return i===\"always\";if(l.has(c)||a&&new RegExp(a.source,a.flags).test(c))return!0;let[,...b]=c.split(\".\");if(b.length>=1){let w=b.length-1,j=b[w];do{if(o.has(j))return!0;w-=1,j=[b[w],j].join(\".\")}while(w>=0)}return!1});return!r&&!s?p:p.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?r:s)||{}))}" - } + "template": "filepaths" } }, { @@ -456,10 +450,7 @@ "description": "Start or gracefully reolad JSON file", "args": { "name": "json", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(h=[])=>{let p=h.filter(({name:c=\"\",type:J})=>{if(i!==\"filter\"&&J===\"folder\")return i===\"always\";if(l.has(c)||a&&new RegExp(a.source,a.flags).test(c))return!0;let[,...b]=c.split(\".\");if(b.length>=1){let w=b.length-1,j=b[w];do{if(o.has(j))return!0;w-=1,j=[b[w],j].join(\".\")}while(w>=0)}return!1});return!r&&!s?p:p.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?r:s)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/pnpm.json b/command-signatures/json/pnpm.json index 88270df3..ddefc84f 100644 --- a/command-signatures/json/pnpm.json +++ b/command-signatures/json/pnpm.json @@ -131,6 +131,7 @@ ], "description": "Pnpm install is used to install all dependencies for a project.\nIn a CI environment, installation fails if a lockfile is present but needs an update.\nInside a workspace, pnpm install installs all dependencies in all the projects.\nIf you want to disable this behavior, set the recursive-install setting to false", "generateSpec": "_NuFrRa_generateSpec(e){return h(this,null,function*(){let n=e.filter(t=>t.trim()!==\"\"&&!t.startsWith(\"-\")).length>2;return{name:\"install\",options:[...F,...n?G:M]}})}", + "args": { "name": "package", "isOptional": true, @@ -913,14 +914,7 @@ "description": "Installs a package and any packages that it depends on. By default, any new package is installed as a production dependency", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_(e,n)=>n.startsWith(\"@\")?!(C(n)>1&&C(e)>1):!(n.includes(\"@\")&&e.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(e,n)=>h(void 0,null,function*(){let t=e[e.length-1];if(t===\"\")return[];let i=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${t}\"`,s=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${t.slice(0,-1)}`,p=o=>o[o.length-1]===\"@\"?n(s):n(i),a=t.startsWith(\"@\")?C(t)>1:t.includes(\"@\");try{let o=JSON.parse(yield p(t));if(a){let r=Object.entries(o[\"dist-tags\"]||{}).map(([l,b])=>({name:l,description:b}));return r.push(...Object.keys(o.versions).map(l=>({name:l})).reverse()),r}return o.results.map(r=>({name:r.package.name,description:r.package.description}))}catch(o){return console.error({error:o}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true }, @@ -1025,17 +1019,11 @@ ], "description": "Pnpm install is used to install all dependencies for a project.\nIn a CI environment, installation fails if a lockfile is present but needs an update.\nInside a workspace, pnpm install installs all dependencies in all the projects.\nIf you want to disable this behavior, set the recursive-install setting to false", "generateSpec": "_NuFrRa_generateSpec(e){return h(this,null,function*(){let n=e.filter(t=>t.trim()!==\"\"&&!t.startsWith(\"-\")).length>2;return{name:\"install\",options:[...F,...n?G:M]}})}", + "args": { "name": "package", "isOptional": true, - "generators": { - "trigger": "_NuFrRa_(e,n)=>n.startsWith(\"@\")?!(C(n)>1&&C(e)>1):!(n.includes(\"@\")&&e.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(e,n)=>h(void 0,null,function*(){let t=e[e.length-1];if(t===\"\")return[];let i=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${t}\"`,s=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${t.slice(0,-1)}`,p=o=>o[o.length-1]===\"@\"?n(s):n(i),a=t.startsWith(\"@\")?C(t)>1:t.includes(\"@\");try{let o=JSON.parse(yield p(t));if(a){let r=Object.entries(o[\"dist-tags\"]||{}).map(([l,b])=>({name:l,description:b}));return r.push(...Object.keys(o.versions).map(l=>({name:l})).reverse()),r}return o.results.map(r=>({name:r.package.name,description:r.package.description}))}catch(o){return console.error({error:o}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true } @@ -1050,10 +1038,7 @@ "args": { "name": "Package", "isOptional": true, - "generators": { - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,n=[]){var t,i;if(e.trim()===\"\")return[];try{let s=JSON.parse(e),p=(t=s.dependencies)!=null?t:{},a=s.devDependencies,o=(i=s.optionalDependencies)!=null?i:{};return Object.assign(p,a,o),Object.keys(p).filter(r=>!n.some(b=>b===r)).map(r=>({name:r,icon:\"\\u{1F4E6}\",description:p[r]?\"dependency\":o[r]?\"optionalDependency\":\"devDependency\"}))}catch(s){return console.error(s),[]}}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, "options": [ @@ -1128,10 +1113,7 @@ "description": "Removes packages from node_modules and from the project's package.json", "args": { "name": "Package", - "generators": { - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,n=[]){var t,i;if(e.trim()===\"\")return[];try{let s=JSON.parse(e),p=(t=s.dependencies)!=null?t:{},a=s.devDependencies,o=(i=s.optionalDependencies)!=null?i:{};return Object.assign(p,a,o),Object.keys(p).filter(r=>!n.some(b=>b===r)).map(r=>({name:r,icon:\"\\u{1F4E6}\",description:p[r]?\"dependency\":o[r]?\"optionalDependency\":\"devDependency\"}))}catch(s){return console.error(s),[]}}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, "options": [ @@ -1187,10 +1169,7 @@ "args": [ { "name": "Package", - "generators": { - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,n=[]){var t,i;if(e.trim()===\"\")return[];try{let s=JSON.parse(e),p=(t=s.dependencies)!=null?t:{},a=s.devDependencies,o=(i=s.optionalDependencies)!=null?i:{};return Object.assign(p,a,o),Object.keys(p).filter(r=>!n.some(b=>b===r)).map(r=>({name:r,icon:\"\\u{1F4E6}\",description:p[r]?\"dependency\":o[r]?\"optionalDependency\":\"devDependency\"}))}catch(s){return console.error(s),[]}}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, { @@ -1228,10 +1207,7 @@ "args": [ { "name": "Package", - "generators": { - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,n=[]){var t,i;if(e.trim()===\"\")return[];try{let s=JSON.parse(e),p=(t=s.dependencies)!=null?t:{},a=s.devDependencies,o=(i=s.optionalDependencies)!=null?i:{};return Object.assign(p,a,o),Object.keys(p).filter(r=>!n.some(b=>b===r)).map(r=>({name:r,icon:\"\\u{1F4E6}\",description:p[r]?\"dependency\":o[r]?\"optionalDependency\":\"devDependency\"}))}catch(s){return console.error(s),[]}}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, { @@ -1381,10 +1357,7 @@ "description": "Shows all packages that depend on the specified package", "args": { "name": "Scripts", - "generators": { - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,n=[]){var t,i;if(e.trim()===\"\")return[];try{let s=JSON.parse(e),p=(t=s.dependencies)!=null?t:{},a=s.devDependencies,o=(i=s.optionalDependencies)!=null?i:{};return Object.assign(p,a,o),Object.keys(p).filter(r=>!n.some(b=>b===r)).map(r=>({name:r,icon:\"\\u{1F4E6}\",description:p[r]?\"dependency\":o[r]?\"optionalDependency\":\"devDependency\"}))}catch(s){return console.error(s),[]}}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, "options": [ @@ -1447,14 +1420,7 @@ "description": "Runs a script defined in the package's manifest file", "args": { "name": "Scripts", - "generators": { - "cache": { - "strategy": "stale-while-revalidate", - "cacheByDirectory": true - }, - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,[n]){if(e.trim()==\"\")return[];try{let t=JSON.parse(e),i=t.scripts,s=t.fig||{};if(i)return Object.entries(i).map(([p,a])=>{let o=n===\"yarn\"?\"fig://icon?type=yarn\":\"fig://icon?type=npm\",r=s[p];return V({name:p,icon:o,description:a},r)})}catch(t){console.error(t)}return[]}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, "options": [ @@ -1496,10 +1462,7 @@ "description": "Execute a shell command in scope of a project.\nnode_modules/.bin is added to the PATH, so pnpm exec allows executing commands of dependencies", "args": { "name": "Scripts", - "generators": { - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,n=[]){var t,i;if(e.trim()===\"\")return[];try{let s=JSON.parse(e),p=(t=s.dependencies)!=null?t:{},a=s.devDependencies,o=(i=s.optionalDependencies)!=null?i:{};return Object.assign(p,a,o),Object.keys(p).filter(r=>!n.some(b=>b===r)).map(r=>({name:r,icon:\"\\u{1F4E6}\",description:p[r]?\"dependency\":o[r]?\"optionalDependency\":\"devDependency\"}))}catch(s){return console.error(s),[]}}" - }, + "generatorName": "until_package_json_do_cd", "isVariadic": true }, "options": [ @@ -1541,10 +1504,7 @@ "description": "Publishes a package to the registry.\nWhen publishing a package inside a workspace, the LICENSE file from the root of the workspace is packed with the package (unless the package has a license of its own).\nYou may override some fields before publish, using the publishConfig field in package.json. You also can use the publishConfig.directory to customize the published subdirectory (usually using third party build tools).\nWhen running this command recursively (pnpm -r publish), pnpm will publish all the packages that have versions not yet published to the registry", "args": { "name": "Branch", - "generators": { - "script": "git branch --no-color", - "postProcess": "function(e){let n=ne(e);return n.startsWith(\"fatal:\")?[]:n.split(`\n`).map(t=>{let i=t.trim(),s=t.match(/\\S+/g);if(s.length>1){if(s[0]==\"*\")return{name:t.replace(\"*\",\"\").trim(),description:\"Current branch\",icon:\"\\u2B50\\uFE0F\"};s[0]==\"+\"&&(i=t.replace(\"+\",\"\").trim())}return{name:i,description:\"Branch\",icon:\"fig://icon?type=git\"}})}" - } + "generatorName": "search_branches" }, "options": [ { diff --git a/command-signatures/json/pod.json b/command-signatures/json/pod.json index e3b43598..599850d2 100644 --- a/command-signatures/json/pod.json +++ b/command-signatures/json/pod.json @@ -308,11 +308,7 @@ "args": { "name": "NAME.podspec|DIRECTORY|http://PATH/NAME.podspec", "isOptional": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let c=u.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||i&&new RegExp(i.source,i.flags).test(p))return!0;let[,...f]=p.split(\".\");if(f.length>=1){let g=f.length-1,P=f[g];do{if(r.has(P))return!0;g-=1,P=[f[g],P].join(\".\")}while(g>=0)}return!1});return!s&&!a?c:c.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?s:a)||{}))}" - } + "template": "filepaths" } } ] @@ -686,10 +682,7 @@ "description": "Additional ancillary podspecs which are used for linting via :path", "args": { "name": "podspec", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let c=u.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||i&&new RegExp(i.source,i.flags).test(p))return!0;let[,...f]=p.split(\".\");if(f.length>=1){let g=f.length-1,P=f[g];do{if(r.has(P))return!0;g-=1,P=[f[g],P].join(\".\")}while(g>=0)}return!1});return!s&&!a?c:c.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?s:a)||{}))}" - } + "template": "filepaths" } }, { @@ -697,10 +690,7 @@ "description": "Additional ancillary podspecs which are used for linting via :podspec. If there are --include-podspecs, then these are removed from them", "args": { "name": "podspec", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let c=u.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||i&&new RegExp(i.source,i.flags).test(p))return!0;let[,...f]=p.split(\".\");if(f.length>=1){let g=f.length-1,P=f[g];do{if(r.has(P))return!0;g-=1,P=[f[g],P].join(\".\")}while(g>=0)}return!1});return!s&&!a?c:c.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?s:a)||{}))}" - } + "template": "filepaths" } }, { @@ -737,11 +727,7 @@ "args": { "name": "PODSPEC_PATHS", "isOptional": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let c=u.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||i&&new RegExp(i.source,i.flags).test(p))return!0;let[,...f]=p.split(\".\");if(f.length>=1){let g=f.length-1,P=f[g];do{if(r.has(P))return!0;g-=1,P=[f[g],P].join(\".\")}while(g>=0)}return!1});return!s&&!a?c:c.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?s:a)||{}))}" - } + "template": "filepaths" } } ] @@ -883,10 +869,7 @@ { "name": "NAME.podspec", "isOptional": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let c=u.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||i&&new RegExp(i.source,i.flags).test(p))return!0;let[,...f]=p.split(\".\");if(f.length>=1){let g=f.length-1,P=f[g];do{if(r.has(P))return!0;g-=1,P=[f[g],P].join(\".\")}while(g>=0)}return!1});return!s&&!a?c:c.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?s:a)||{}))}" - } + "template": "filepaths" } ] }, diff --git a/command-signatures/json/pre-commit.json b/command-signatures/json/pre-commit.json index 692024db..04dc07e1 100644 --- a/command-signatures/json/pre-commit.json +++ b/command-signatures/json/pre-commit.json @@ -397,10 +397,7 @@ "description": "Remote branch ref used by `git push`", "args": { "name": "REMOTE_BRANCH", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_e=>{let{insertWithoutRemotes:t=!1}=s,i=ce(e);return i.startsWith(\"fatal:\")?[]:i.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let r=n.trim(),o=n.match(/\\S+/g);if(o.length>1){if(o[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};o[0]===\"+\"&&(r=n.replace(\"+\",\"\").trim())}let a=\"Branch\";return t&&r.startsWith(\"remotes/\")&&(r=r.slice(r.indexOf(\"/\",8)+1),a=\"Remote branch\"),{name:r,description:a,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch_no" } }, { @@ -408,10 +405,7 @@ "description": "Local branch ref used by `git push`", "args": { "name": "LOCAL_BRANCH", - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_e=>{let{insertWithoutRemotes:t=!1}=s,i=ce(e);return i.startsWith(\"fatal:\")?[]:i.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let r=n.trim(),o=n.match(/\\S+/g);if(o.length>1){if(o[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};o[0]===\"+\"&&(r=n.replace(\"+\",\"\").trim())}let a=\"Branch\";return t&&r.startsWith(\"remotes/\")&&(r=r.slice(r.indexOf(\"/\",8)+1),a=\"Remote branch\"),{name:r,description:a,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -423,10 +417,7 @@ "description": "Represents the original ref in a `from_ref...to_ref` diff expression. For `pre-push` hooks, this represents the branch you are pushing to. For `post-checkout` hooks, this represents the branch that was previously checked out", "args": { "name": "FROM_REF", - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(s){let e=ce(s);return e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(t=>({name:t.substring(0,7),icon:\"fig://icon?type=node\",description:t.substring(7)}))}" - } + "generatorName": "git_rev_list" } }, { @@ -438,10 +429,7 @@ "description": "Represents the destination ref in a `from_ref...to_ref` diff expression. For `pre-push` hooks, this represents the branch being pushed. For `post-checkout` hooks, this represents the branch that is now checked out", "args": { "name": "TO_REF", - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(s){let e=ce(s);return e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(t=>({name:t.substring(0,7),icon:\"fig://icon?type=node\",description:t.substring(7)}))}" - } + "generatorName": "git_rev_list" } }, { @@ -456,10 +444,7 @@ "description": "Remote name used by `git push`", "args": { "name": "REMOTE_NAME", - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(s){let e=s.split(`\n`).reduce((t,i)=>{let n=i.split(\"\t\"),r=n[0];console.log(r,n);let o=n[1].split(\" \")[0];return t[r]=o,t},{});return Object.keys(e).map(t=>{let i=e[t],n=\"box\";return i.includes(\"github.com\")&&(n=\"github\"),i.includes(\"gitlab.com\")&&(n=\"gitlab\"),i.includes(\"heroku.com\")&&(n=\"heroku\"),{name:t,icon:`fig://icon?type=${n}`,description:\"Remote\"}})}" - } + "generatorName": "git_remote" } }, { @@ -495,10 +480,7 @@ "name": "hook", "description": "A single hook-id to run", "isOptional": true, - "generators": { - "script": "cat .pre-commit-config.yaml", - "postProcess": "_NuFrRa_s=>{let e=[];try{let t=hi.default.parse(s).repos;return t&&t.forEach(i=>{i.hooks.forEach(n=>{e.push({name:`${n.id}`})})}),e}catch(t){console.log(t)}}" - } + "generatorName": "cat_pre_commit_config_yaml" } }, { @@ -549,10 +531,7 @@ "name": "hook", "description": "A single hook-id to run", "isOptional": true, - "generators": { - "script": "cat .pre-commit-config.yaml", - "postProcess": "_NuFrRa_s=>{let e=[];try{let t=hi.default.parse(s).repos;return t&&t.forEach(i=>{i.hooks.forEach(n=>{e.push({name:`${n.id}`})})}),e}catch(t){console.log(t)}}" - } + "generatorName": "cat_pre_commit_config_yaml" } ], "options": [ @@ -637,10 +616,7 @@ "description": "Remote branch ref used by `git push`", "args": { "name": "REMOTE_BRANCH", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_e=>{let{insertWithoutRemotes:t=!1}=s,i=ce(e);return i.startsWith(\"fatal:\")?[]:i.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let r=n.trim(),o=n.match(/\\S+/g);if(o.length>1){if(o[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};o[0]===\"+\"&&(r=n.replace(\"+\",\"\").trim())}let a=\"Branch\";return t&&r.startsWith(\"remotes/\")&&(r=r.slice(r.indexOf(\"/\",8)+1),a=\"Remote branch\"),{name:r,description:a,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch_no" } }, { @@ -648,10 +624,7 @@ "description": "Local branch ref used by `git push`", "args": { "name": "LOCAL_BRANCH", - "generators": { - "script": "git --no-optional-locks branch --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_e=>{let{insertWithoutRemotes:t=!1}=s,i=ce(e);return i.startsWith(\"fatal:\")?[]:i.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let r=n.trim(),o=n.match(/\\S+/g);if(o.length>1){if(o[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};o[0]===\"+\"&&(r=n.replace(\"+\",\"\").trim())}let a=\"Branch\";return t&&r.startsWith(\"remotes/\")&&(r=r.slice(r.indexOf(\"/\",8)+1),a=\"Remote branch\"),{name:r,description:a,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -663,10 +636,7 @@ "description": "Represents the original ref in a `from_ref...to_ref` diff expression. For `pre-push` hooks, this represents the branch you are pushing to. For `post-checkout` hooks, this represents the branch that was previously checked out", "args": { "name": "FROM_REF", - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(s){let e=ce(s);return e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(t=>({name:t.substring(0,7),icon:\"fig://icon?type=node\",description:t.substring(7)}))}" - } + "generatorName": "git_rev_list" } }, { @@ -678,10 +648,7 @@ "description": "Represents the destination ref in a `from_ref...to_ref` diff expression. For `pre-push` hooks, this represents the branch being pushed. For `post-checkout` hooks, this represents the branch that is now checked out", "args": { "name": "TO_REF", - "generators": { - "script": "git rev-list --all --oneline", - "postProcess": "function(s){let e=ce(s);return e.startsWith(\"fatal:\")?[]:e.split(`\n`).map(t=>({name:t.substring(0,7),icon:\"fig://icon?type=node\",description:t.substring(7)}))}" - } + "generatorName": "git_rev_list" } }, { @@ -696,10 +663,7 @@ "description": "Remote name used by `git push`", "args": { "name": "REMOTE_NAME", - "generators": { - "script": "git --no-optional-locks remote -v", - "postProcess": "function(s){let e=s.split(`\n`).reduce((t,i)=>{let n=i.split(\"\t\"),r=n[0];console.log(r,n);let o=n[1].split(\" \")[0];return t[r]=o,t},{});return Object.keys(e).map(t=>{let i=e[t],n=\"box\";return i.includes(\"github.com\")&&(n=\"github\"),i.includes(\"gitlab.com\")&&(n=\"gitlab\"),i.includes(\"heroku.com\")&&(n=\"heroku\"),{name:t,icon:`fig://icon?type=${n}`,description:\"Remote\"}})}" - } + "generatorName": "git_remote" } }, { diff --git a/command-signatures/json/projj.json b/command-signatures/json/projj.json index 9c45367b..23b04e7c 100644 --- a/command-signatures/json/projj.json +++ b/command-signatures/json/projj.json @@ -18,10 +18,7 @@ "description": "Find repository", "args": { "name": "repository name", - "generators": { - "script": "cat ~/.projj/cache.json", - "postProcess": "function(o){let r=JSON.parse(o);return Object.keys(r).map(e=>({name:e.split(\"/\").pop(),description:r[e].repo}))}" - } + "generatorName": "cat_projj_cache_json" } }, { @@ -41,10 +38,7 @@ "description": "Remove repository", "args": { "name": "repository name", - "generators": { - "script": "cat ~/.projj/cache.json", - "postProcess": "function(o){let r=JSON.parse(o);return Object.keys(r).map(e=>({name:e.split(\"/\").pop(),description:r[e].repo}))}" - } + "generatorName": "cat_projj_cache_json" } }, { @@ -52,10 +46,7 @@ "description": "Run hook in current directory", "args": { "name": "hook name", - "generators": { - "script": "cat ~/.projj/config.json", - "postProcess": "function(o){let e=JSON.parse(o).hooks;return Object.keys(e).map(n=>({name:n,description:e[n]}))}" - } + "generatorName": "cat_projj_config_json" } }, { @@ -63,10 +54,7 @@ "description": "Run hook in every repository", "args": { "name": "hook name", - "generators": { - "script": "cat ~/.projj/config.json", - "postProcess": "function(o){let e=JSON.parse(o).hooks;return Object.keys(e).map(n=>({name:n,description:e[n]}))}" - } + "generatorName": "cat_projj_config_json" } }, { diff --git a/command-signatures/json/python.json b/command-signatures/json/python.json index 1b775e12..0b4c1c40 100644 --- a/command-signatures/json/python.json +++ b/command-signatures/json/python.json @@ -2,13 +2,11 @@ "name": "python", "description": "Run the python interpreter", "generateSpec": "_NuFrRa_(e,n)=>_(void 0,null,function*(){if((yield n(\"cat manage.py | grep -q django; echo $?\"))===\"0\")return{name:\"python\",subcommands:[{name:\"manage.py\",loadSpec:\"django-admin\"}]}})", + "args": { "name": "python script", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let u=d.filter(({name:l=\"\",type:D})=>{if(i!==\"filter\"&&D===\"folder\")return i===\"always\";if(r.has(l)||o&&new RegExp(o.source,o.flags).test(l))return!0;let[,...m]=l.split(\".\");if(m.length>=1){let p=m.length-1,b=m[p];do{if(c.has(b))return!0;p-=1,b=[m[p],b].join(\".\")}while(p>=0)}return!1});return!s&&!a?u:u.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?s:a)||{}))}" - }, + "template": "filepaths", "skipGeneratorValidation": false }, "options": [ diff --git a/command-signatures/json/python3.json b/command-signatures/json/python3.json index b873f081..a5da1b6a 100644 --- a/command-signatures/json/python3.json +++ b/command-signatures/json/python3.json @@ -2,13 +2,11 @@ "name": "python3", "description": "Run the python interpreter", "generateSpec": "_NuFrRa_(e,n)=>S(void 0,null,function*(){if((yield n(\"cat manage.py | grep -q django; echo $?\"))===\"0\")return{name:\"python3\",subcommands:[{name:\"manage.py\",loadSpec:\"django-admin\"}]}})", + "args": { "name": "python script", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let u=d.filter(({name:l=\"\",type:F})=>{if(i!==\"filter\"&&F===\"folder\")return i===\"always\";if(r.has(l)||o&&new RegExp(o.source,o.flags).test(l))return!0;let[,...h]=l.split(\".\");if(h.length>=1){let p=h.length-1,b=h[p];do{if(c.has(b))return!0;p-=1,b=[h[p],b].join(\".\")}while(p>=0)}return!1});return!s&&!a?u:u.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?s:a)||{}))}" - }, + "template": "filepaths", "skipGeneratorValidation": false }, "options": [ diff --git a/command-signatures/json/quickmail.json b/command-signatures/json/quickmail.json index ea53a516..e95eaad2 100644 --- a/command-signatures/json/quickmail.json +++ b/command-signatures/json/quickmail.json @@ -100,10 +100,7 @@ "args": { "name": "Template", "isOptional": true, - "generators": { - "script": "quickmail template listall", - "postProcess": "_NuFrRa_i=>i.split(`\n`).map(e=>({name:e,icon:\"fig://icon?type=box\",description:e}))" - } + "generatorName": "template_listall" } }, { @@ -202,10 +199,7 @@ "description": "Edit template by id", "args": { "name": "Template id", - "generators": { - "script": "quickmail template listall", - "postProcess": "_NuFrRa_i=>i.split(`\n`).map(e=>({name:e,icon:\"fig://icon?type=box\",description:e}))" - } + "generatorName": "template_listall" } } ] diff --git a/command-signatures/json/r.json b/command-signatures/json/r.json index 09a2fd55..c3e89819 100644 --- a/command-signatures/json/r.json +++ b/command-signatures/json/r.json @@ -41,10 +41,7 @@ { "name": "infile", "description": "A file with R code to be executed", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" }, { "name": "outfile", @@ -75,11 +72,7 @@ "name": "files", "description": "Source files to be compiled", "isVariadic": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -156,11 +149,7 @@ "name": "files", "description": "The object files to be included in the shared object/DLL", "isVariadic": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -209,10 +198,7 @@ "args": { "name": "LIB", "description": "Path to the R library tree to install to", - "generators": { - "script": "Rscript -e '.libPaths()'", - "postProcess": "_NuFrRa_e=>e.includes(\"not found\")?[]:e.split(`\n`).map(t=>({name:t.replace(/\\d+/,\"\").replace(\"[]\",\"\").trim(),description:\"Library\"}))" - } + "generatorName": "rscript_libpaths" } }, { @@ -478,9 +464,7 @@ "args": { "name": "packages", "description": "Directories with the package sources", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -517,10 +501,7 @@ "args": { "name": "LIB", "description": "Library tree", - "generators": { - "script": "Rscript -e '.libPaths()'", - "postProcess": "_NuFrRa_e=>e.includes(\"not found\")?[]:e.split(`\n`).map(t=>({name:t.replace(/\\d+/,\"\").replace(\"[]\",\"\").trim(),description:\"Library\"}))" - } + "generatorName": "rscript_libpaths" } } ] @@ -532,9 +513,7 @@ "name": "pakgdirs", "description": "Package directories", "isVariadic": true, - "generators": { - "template": "folders" - } + "template": "folders" }, "options": [ { @@ -664,9 +643,7 @@ "name": "LIB", "description": "Library tree", "default": ".", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -680,9 +657,7 @@ "name": "directory", "description": "Directory for output", "default": ".", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -758,9 +733,7 @@ "name": "directory", "description": "Directory with the tests directory", "default": "tests", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -816,11 +789,7 @@ "name": "packages", "description": "Packages to check", "isVariadic": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -915,9 +884,7 @@ "description": "File generated by `Rprof()`", "isOptional": true, "default": "Rprof.out", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } }, { @@ -1022,11 +989,7 @@ "args": { "name": "file", "description": "R doc file to convert", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -1140,9 +1103,7 @@ "args": { "name": "working dir", "description": "Working directory for the build", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -1158,9 +1119,7 @@ "args": { "name": "files or pkgs", "description": "Rd files, or a directory with the sources of a pkg, or an installed pkg", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -1266,11 +1225,7 @@ "args": { "name": "file", "description": "R doc file to convert", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { @@ -1329,9 +1284,7 @@ "args": { "name": "file", "description": "File to process", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -1430,9 +1383,7 @@ "args": { "name": "file", "description": "Vignette to build", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } }, { @@ -1458,16 +1409,12 @@ { "name": "from", "description": "'From' R output file (or '-' for stdin)", - "generators": { - "template": "filepaths" - } + "template": "filepaths" }, { "name": "to", "description": "'To' R output file", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } ] }, @@ -1902,10 +1849,7 @@ "args": { "name": "file", "description": "File to run", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(g=[])=>{let p=g.filter(({name:d=\"\",type:_})=>{if(n!==\"filter\"&&_===\"folder\")return n===\"always\";if(u.has(d)||o&&new RegExp(o.source,o.flags).test(d))return!0;let[,...h]=d.split(\".\");if(h.length>=1){let S=h.length-1,k=h[S];do{if(c.has(k))return!0;S-=1,k=[h[S],k].join(\".\")}while(S>=0)}return!1});return!r&&!a?p:p.map(d=>Object.assign(Object.assign({},d),(d.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/rancher.json b/command-signatures/json/rancher.json index 1a6244f4..8649cb63 100644 --- a/command-signatures/json/rancher.json +++ b/command-signatures/json/rancher.json @@ -43,10 +43,7 @@ "description": "Path to an answers file, the format of the file is a map with key:value. This supports JSON and YAML", "args": { "name": "answers-file-path", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let c=u.filter(({name:l=\"\",type:N})=>{if(s!==\"filter\"&&N===\"folder\")return s===\"always\";if(p.has(l)||i&&new RegExp(i.source,i.flags).test(l))return!0;let[,...h]=l.split(\".\");if(h.length>=1){let f=h.length-1,y=h[f];do{if(r.has(y))return!0;f-=1,y=[h[f],y].join(\".\")}while(f>=0)}return!1});return!a&&!o?c:c.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?a:o)||{}))}" - } + "template": "filepaths" } }, { @@ -358,10 +355,7 @@ "args": { "name": "SERVER_NAME", "description": "The name of server you want to delete", - "generators": { - "script": "rancher server ls", - "postProcess": "function(e){let t=e.split(`\n`),n=[];for(let i=1;ie.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -48,10 +45,7 @@ "description": "Concatenates any files and sends them to stdout", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -94,17 +88,11 @@ "args": [ { "name": "source:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ], "options": [ @@ -165,10 +153,7 @@ "description": "Clean up the remote if possible", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } }, { @@ -195,17 +180,11 @@ "args": [ { "name": "source:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "dest:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ] }, @@ -215,17 +194,11 @@ "args": [ { "name": "source:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "dest:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ] }, @@ -238,10 +211,7 @@ }, { "name": "dest:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ] }, @@ -251,17 +221,11 @@ "args": [ { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "cryptedremote", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ], "options": [ @@ -319,10 +283,7 @@ "args": [ { "name": "cryptedremote", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "encryptedfilename", @@ -341,10 +302,7 @@ "description": "Interactively find duplicate filenames and delete/rename them", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -404,10 +362,7 @@ "isDangerous": true, "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -422,10 +377,7 @@ "description": "Remove a single file from remote", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } }, { @@ -487,10 +439,7 @@ }, { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ], "options": [ @@ -526,10 +475,7 @@ "description": "Generate public link to file/folder", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -560,10 +506,7 @@ "description": "List the objects in the path with size and path", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } }, { @@ -571,10 +514,7 @@ "description": "List all directories/containers/buckets in the path", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -590,10 +530,7 @@ "description": "List directories and objects in remote:path formatted for parsing", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -699,10 +636,7 @@ "description": "List directories and objects in the path in JSON format", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -766,10 +700,7 @@ "description": "List the objects in path with modification time, size and path", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } }, { @@ -777,10 +708,7 @@ "description": "Produces an md5sum file for all the objects in the path", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, "options": [ { @@ -806,10 +734,7 @@ "description": "Make the path if it doesn't already exist", "args": { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } }, { @@ -818,10 +743,7 @@ "args": [ { "name": "remote:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "mountpoint", @@ -913,17 +835,11 @@ "args": [ { "name": "source:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" }, { "name": "dest:path", - "generators": { - "script": "rclone listremotes", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(i=>({name:i}))" - } + "generatorName": "listremotes" } ] }, diff --git a/command-signatures/json/react-native.json b/command-signatures/json/react-native.json index 00ffdf1f..6f298977 100644 --- a/command-signatures/json/react-native.json +++ b/command-signatures/json/react-native.json @@ -32,11 +32,7 @@ "description": "Path to the root JS file, either absolute or relative to JS root", "args": { "name": "file", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateName": "filter-js-files" - } + "template": "filepaths" } }, { @@ -358,11 +354,7 @@ "description": "Path to a JavaScript file that exports a log reporter as a replacement for TerminalReporter", "args": { "name": "logFile", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateName": "filter-js-files" - } + "template": "filepaths" } }, { @@ -418,11 +410,7 @@ "description": "Path to the root JS file, either absolute or relative to JS root", "args": { "name": "file", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateName": "filter-js-files" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/redwood.json b/command-signatures/json/redwood.json index df2eedb7..0e1461f2 100644 --- a/command-signatures/json/redwood.json +++ b/command-signatures/json/redwood.json @@ -556,10 +556,7 @@ "args": { "name": "script", "description": "Name of the script to execute", - "generators": { - "script": "until [[ -f redwood.toml ]] || [[ $PWD = '/' ]]; do cd ..; done; ls -1p scripts/", - "postProcess": "_NuFrRa_a=>a.trim()===\"\"?[]:a.split(`\n`).filter(o=>o.endsWith(\".js\")||o.endsWith(\".ts\")).map(o=>({name:o.trim().replace(/\\.[^.]+$/,\"\"),description:\"Script\",icon:e}))" - } + "generatorName": "until_redwood_toml_do_cd" } }, { diff --git a/command-signatures/json/robot.json b/command-signatures/json/robot.json index 23883cd1..3a1e9dfb 100644 --- a/command-signatures/json/robot.json +++ b/command-signatures/json/robot.json @@ -5,10 +5,7 @@ "name": "robot script", "isScript": true, "isVariadic": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(c=[])=>{let d=c.filter(({name:p=\"\",type:V})=>{if(i!==\"filter\"&&V===\"folder\")return i===\"always\";if(l.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...h]=p.split(\".\");if(h.length>=1){let y=h.length-1,x=h[y];do{if(r.has(x))return!0;y-=1,x=[h[y],x].join(\".\")}while(y>=0)}return!1});return!o&&!a?d:d.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?o:a)||{}))}" - } + "template": "filepaths" }, "options": [ { @@ -85,10 +82,7 @@ "description": "Select tests by name or by long name containing also parent suite name like `Parent.Test`", "args": { "name": "name", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:\\*{3} ?Test Cases ?\\*{3})([\\S\\s]*)(?:\\*{3}(\\w+\\s?)+\\*{3})*/gim),n=new Set,s=[];for(let[i,o]of t){let a=o.matchAll(/^(\\w+ *)+(?!.\\#.*)(?!.\\#.*)/gm);for(let[r]of a)r=r.trim(),r.search(/\\s\\s+/)==-1&&(n.has(r)||(n.add(r),s.push({name:r,description:\"Test case\"})))}return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -96,10 +90,7 @@ "description": "Alias to --test. Especially applicable with --rpa", "args": { "name": "name", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:\\*{3} ?Test Cases ?\\*{3})([\\S\\s]*)(?:\\*{3}(\\w+\\s?)+\\*{3})*/gim),n=new Set,s=[];for(let[i,o]of t){let a=o.matchAll(/^(\\w+ *)+(?!.\\#.*)(?!.\\#.*)/gm);for(let[r]of a)r=r.trim(),r.search(/\\s\\s+/)==-1&&(n.has(r)||(n.add(r),s.push({name:r,description:\"Test case\"})))}return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -120,10 +111,7 @@ "description": "Select test cases by tag", "args": { "name": "tag", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -134,10 +122,7 @@ "description": "Select test cases not to run by tag", "args": { "name": "tag", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -148,10 +133,7 @@ "description": "Select failed tests from an earlier output file to be re-executed", "args": { "name": "output file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(c=[])=>{let d=c.filter(({name:p=\"\",type:V})=>{if(i!==\"filter\"&&V===\"folder\")return i===\"always\";if(l.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...h]=p.split(\".\");if(h.length>=1){let y=h.length-1,x=h[y];do{if(r.has(x))return!0;y-=1,x=[h[y],x].join(\".\")}while(y>=0)}return!1});return!o&&!a?d:d.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?o:a)||{}))}" - } + "template": "filepaths" } }, { @@ -162,10 +144,7 @@ "description": "Select failed suites from an earlier output file to be re-executed", "args": { "name": "output file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(c=[])=>{let d=c.filter(({name:p=\"\",type:V})=>{if(i!==\"filter\"&&V===\"folder\")return i===\"always\";if(l.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...h]=p.split(\".\");if(h.length>=1){let y=h.length-1,x=h[y];do{if(r.has(x))return!0;y-=1,x=[h[y],x].join(\".\")}while(y>=0)}return!1});return!o&&!a?d:d.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?o:a)||{}))}" - } + "template": "filepaths" } }, { @@ -177,10 +156,7 @@ "description": "Tests having given tag will be skipped", "args": { "name": "tag", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -188,10 +164,7 @@ "description": "Tests having given tag will be skipped if they fail", "args": { "name": "tag", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -202,10 +175,7 @@ "description": "Set variables in the test data", "args": { "name": "variable", - "generators": { - "trigger": ":", - "custom": "_NuFrRa_(e,t)=>T(void 0,null,function*(){return e[e.length-1].includes(\":\")?[]:[...(yield t('for i in $(find -E . -regex \".*.(robot|resource)\" -type f); do cat -s $i ; done')).matchAll(/^\\$\\{(.*?)\\}/gm)].map(a=>a[1]).map(a=>({name:a,description:\"Variable\"}))})" - } + "template": "filepaths" } }, { @@ -216,10 +186,7 @@ "description": "Python or YAML file file to read variables from", "args": { "name": "file", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(c=[])=>{let d=c.filter(({name:p=\"\",type:V})=>{if(i!==\"filter\"&&V===\"folder\")return i===\"always\";if(l.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...h]=p.split(\".\");if(h.length>=1){let y=h.length-1,x=h[y];do{if(r.has(x))return!0;y-=1,x=[h[y],x].join(\".\")}while(y>=0)}return!1});return!o&&!a?d:d.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?o:a)||{}))}" - } + "template": "filepaths" } }, { @@ -419,10 +386,7 @@ "description": "Include only matching tags in `Statistics by Tag` in log and report", "args": { "name": "tag", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -430,10 +394,7 @@ "description": "Exclude matching tags from `Statistics by Tag`", "args": { "name": "tag", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -441,10 +402,7 @@ "description": "Create combined statistics based on tags. These statistics are added into `Statistics by Tag`", "args": { "name": "tags:name", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -452,10 +410,7 @@ "description": "Add documentation to tags matching the given pattern", "args": { "name": "pattern:doc", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -463,10 +418,7 @@ "description": "Add external links into `Statistics by Tag`. Pattern can use `*`, `?` and `[]` as wildcards", "args": { "name": "pattern:link:title", - "generators": { - "script": "for i in $(find -E . -regex \".*.robot\" -type f); do cat -s $i ; done", - "postProcess": "_NuFrRa_e=>{let t=e.matchAll(/(?:^\\s\\s+\\[Tags\\])\\s\\s+(\\w+ *)*(?!.\\#.*)/gm),n=new Set,s=[];for(let[i]of t)for(let o of i.trim().substring(6).trim().split(/\\s\\s+/))n.has(o)||(n.add(o),s.push({name:o,description:\"Tag\",icon:\"\\u{1F3F7}\"}));return s}" - } + "generatorName": "for_i_in_robot" } }, { @@ -766,10 +718,7 @@ "description": "Additional locations (directories, ZIPs) where to search libraries and other extensions when they are imported", "args": { "name": "path", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(c=[])=>{let d=c.filter(({name:p=\"\",type:V})=>{if(i!==\"filter\"&&V===\"folder\")return i===\"always\";if(l.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...h]=p.split(\".\");if(h.length>=1){let y=h.length-1,x=h[y];do{if(r.has(x))return!0;y-=1,x=[h[y],x].join(\".\")}while(y>=0)}return!1});return!o&&!a?d:d.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?o:a)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/rollup.json b/command-signatures/json/rollup.json index d5f33d06..95949235 100644 --- a/command-signatures/json/rollup.json +++ b/command-signatures/json/rollup.json @@ -10,10 +10,7 @@ "description": "Use this config file (if argument is used but value is unspecified, defaults to rollup.config.js)", "args": { "name": "filename", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(u=[])=>{let d=u.filter(({name:c=\"\",type:T})=>{if(i!==\"filter\"&&T===\"folder\")return i===\"always\";if(l.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...f]=c.split(\".\");if(f.length>=1){let g=f.length-1,w=f[g];do{if(a.has(w))return!0;g-=1,w=[f[g],w].join(\".\")}while(g>=0)}return!1});return!r&&!s?d:d.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?r:s)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/rscript.json b/command-signatures/json/rscript.json index 30e0bc55..6c447880 100644 --- a/command-signatures/json/rscript.json +++ b/command-signatures/json/rscript.json @@ -70,10 +70,7 @@ "name": "file", "description": "R script to run", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let c=p.filter(({name:u=\"\",type:F})=>{if(i!==\"filter\"&&F===\"folder\")return i===\"always\";if(f.has(u)||r&&new RegExp(r.source,r.flags).test(u))return!0;let[,...g]=u.split(\".\");if(g.length>=1){let h=g.length-1,w=g[h];do{if(a.has(w))return!0;h-=1,w=[g[h],w].join(\".\")}while(h>=0)}return!1});return!o&&!s?c:c.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?o:s)||{}))}" - } + "template": "filepaths" }, { "name": "args", diff --git a/command-signatures/json/rush.json b/command-signatures/json/rush.json index d2be9516..1eba6449 100644 --- a/command-signatures/json/rush.json +++ b/command-signatures/json/rush.json @@ -16,14 +16,7 @@ "isRepeatable": true, "args": { "name": "PACKAGE", - "generators": { - "trigger": "_NuFrRa_(e,t)=>t.startsWith(\"@\")?!(E(t)>1&&E(e)>1):!(t.includes(\"@\")&&e.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(e,t)=>I(void 0,null,function*(){let i=e[e.length-1];if(i===\"\")return[];let c=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${i}\"`,r=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${i.slice(0,-1)}`,s=n=>n[n.length-1]===\"@\"?t(r):t(c),d=i.startsWith(\"@\")?E(i)>1:i.includes(\"@\");try{let n=JSON.parse(yield s(i));if(d){let o=Object.entries(n[\"dist-tags\"]||{}).map(([l,T])=>({name:l,description:T}));return o.push(...Object.keys(n.versions).map(l=>({name:l})).reverse()),o}return n.results.map(o=>({name:o.package.name,description:o.package.description}))}catch(n){return console.error({error:n}),[]}})" - }, + "template": "filepaths", "debounce": true } }, @@ -293,10 +286,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--to\" parameter expands this selection to include PROJECT and all its dependencies. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -307,10 +297,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--to-except\" parameter expands this selection to include all dependencies of PROJECT, but not PROJECT itself. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -321,10 +308,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--from\" parameter expands this selection to include PROJECT and all projects that depend on it, plus all dependencies of this set. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -335,10 +319,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--only\" parameter expands this selection to include PROJECT; its dependencies are not added. \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -349,10 +330,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--impacted-by\" parameter expands this selection to include PROJECT and any projects that depend on PROJECT (and thus might be broken by changes to PROJECT). \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -363,10 +341,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--impacted-by-except\" parameter works the same as \"--impacted-by\" except that PROJECT itself is not added to the selection. \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -788,10 +763,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--to\" parameter expands this selection to include PROJECT and all its dependencies. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -802,10 +774,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--to-except\" parameter expands this selection to include all dependencies of PROJECT, but not PROJECT itself. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -816,10 +785,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--from\" parameter expands this selection to include PROJECT and all projects that depend on it, plus all dependencies of this set. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -830,10 +796,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--only\" parameter expands this selection to include PROJECT; its dependencies are not added. \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -844,10 +807,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--impacted-by\" parameter expands this selection to include PROJECT and any projects that depend on PROJECT (and thus might be broken by changes to PROJECT). \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -858,10 +818,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--impacted-by-except\" parameter works the same as \"--impacted-by\" except that PROJECT itself is not added to the selection. \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -920,10 +877,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--to\" parameter expands this selection to include PROJECT and all its dependencies. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -934,10 +888,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--to-except\" parameter expands this selection to include all dependencies of PROJECT, but not PROJECT itself. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -948,10 +899,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--from\" parameter expands this selection to include PROJECT and all projects that depend on it, plus all dependencies of this set. \".\" can be used as shorthand for the project in the current working directory. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -962,10 +910,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--only\" parameter expands this selection to include PROJECT; its dependencies are not added. \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -976,10 +921,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--impacted-by\" parameter expands this selection to include PROJECT and any projects that depend on PROJECT (and thus might be broken by changes to PROJECT). \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, @@ -990,10 +932,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "script": "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", - "postProcess": "function(e){let t=[];try{if(!e)return t;let i=JSON.parse(S(e.trim()));for(let c of i.projects)t.push({name:c.packageName,description:\"Projects\"})}catch(i){console.log(\"generate project suggestion fail: \",i)}return t}" - } + "generatorName": "until_rush_json_do_cd" }, "description": "Normally all projects in the monorepo will be processed; adding this parameter will instead select a subset of projects. Each \"--impacted-by-except\" parameter works the same as \"--impacted-by\" except that PROJECT itself is not added to the selection. \".\" can be used as shorthand for the project in the current working directory. Note that this parameter is \"unsafe\" as it may produce a selection that excludes some dependencies. For details, refer to the website article \"Selecting subsets of projects\"" }, diff --git a/command-signatures/json/rushx.json b/command-signatures/json/rushx.json index a28bf3da..a3a93354 100644 --- a/command-signatures/json/rushx.json +++ b/command-signatures/json/rushx.json @@ -4,14 +4,7 @@ "args": { "name": "Scripts", "description": "Script to run from your package.json", - "generators": { - "cache": { - "strategy": "stale-while-revalidate", - "cacheByDirectory": true - }, - "script": "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", - "postProcess": "function(e,[n]){if(e.trim()==\"\")return[];try{let a=JSON.parse(e),t=a.scripts,o=a.fig||{};if(t)return Object.entries(t).map(([p,i])=>{let s=n===\"yarn\"?\"fig://icon?type=yarn\":\"fig://icon?type=npm\",r=o[p];return V({name:p,icon:s,description:i},r)})}catch(a){console.error(a)}return[]}" - }, + "generatorName": "until_package_json_do_cd", "parserDirectives": { "alias": "_NuFrRa_(e,n)=>h(void 0,null,function*(){var o;let a=yield n(\"cat $(npm prefix)/package.json\"),t=(o=JSON.parse(a).scripts)==null?void 0:o[e];if(!t)throw new Error(`Script not found: '${e}'`);return t})" }, diff --git a/command-signatures/json/rustup.json b/command-signatures/json/rustup.json index 1ca92424..c5fdc1e3 100644 --- a/command-signatures/json/rustup.json +++ b/command-signatures/json/rustup.json @@ -676,10 +676,7 @@ "args": { "name": "", "description": "Topic such as 'core', 'fn', 'usize', 'eprintln!', 'core::arch', 'alloc::format!', 'std::fs', 'std::fs::read_dir', 'std::io::Bytes', 'std::iter::Sum', 'std::io::error::Result' etc", - "generators": { - "script": "find $(rustup docs --path | sed -e \"s|index\\.html|std|\") $(rustup docs --path | sed -e \"s|index\\.html|alloc|\") $(rustup docs --path | sed -e \"s|index\\.html|core|\") | grep \"\\.html\" | sed -E -e \"s|^(.*)/html/||\" -e \"s|\\.html||\" -e \"s|/|::|g\" -e \"s/constant\\.|trait\\.|struct\\.|macro\\.|fn\\.|keyword\\.|primitive\\.|type\\.|enum\\.|union\\.|traitalias\\.|::index$|^(.*)::all$//\" -e \"/^$/d\"", - "splitOn": "\n" - } + "generatorName": "find_docs_s_index_html" } }, { diff --git a/command-signatures/json/scc.json b/command-signatures/json/scc.json index 0c91c690..3e239779 100644 --- a/command-signatures/json/scc.json +++ b/command-signatures/json/scc.json @@ -46,12 +46,7 @@ "description": "Count a file extension as a language (comma-separated key:value list, eg. jst:js,tpl:Markdown)", "args": { "name": "string", - "generators": { - "trigger": "_NuFrRa_(e,n)=>{let i=g(e),t=g(n);return i!==t}", - "getQueryTerm": "_NuFrRa_e=>{let n=g(e);return e.slice(n+1)}", - "script": "scc --languages", - "postProcess": "_NuFrRa_(e,n)=>{let{extensions:i,languages:t}=l(e),s=n[n.length-1];return u(s)?Object.entries(i).map(([o,a])=>({name:o,description:a})):t.map(o=>({name:o}))}" - } + "generatorName": "completions" } }, { @@ -63,10 +58,7 @@ "description": "Directories to exclude", "args": { "name": "strings", - "generators": { - "template": "folders", - "getQueryTerm": "," - } + "template": "folders" } }, { @@ -125,11 +117,7 @@ "description": "Multiple outputs with different formats (comma-separated key:value list, eg. tabular:stdout,csv:scc.csv)", "args": { "name": "string", - "generators": { - "trigger": "_NuFrRa_(e,n)=>{let i=g(e),t=g(n);return i!==t}", - "getQueryTerm": "_NuFrRa_e=>{let n=g(e);return e.slice(n+1)}", - "custom": "_NuFrRa_(e,n)=>f(void 0,null,function*(){let i=e[e.length-1];if(u(i))return b;let s=(yield n(\"ls -lAF1\")).split(`\n`).map(o=>({name:o.slice(o.lastIndexOf(\"/\")+1),icon:`fig://${o}`}));return s.push({name:\"stdout\",priority:75}),s})" - } + "template": "filepaths" } }, { @@ -160,11 +148,7 @@ "description": "Limit to these file extensions (comma-separated list)", "args": { "name": "strings", - "generators": { - "getQueryTerm": ",", - "script": "scc --languages", - "postProcess": "_NuFrRa_e=>{let{extensions:n}=l(e);return Object.entries(n).map(([i,t])=>({name:i,description:t,icon:\"fig://icon?type=string\"}))}" - } + "generatorName": "completions" } }, { @@ -286,12 +270,7 @@ "description": "Inspect every file and set its type by checking for a string (comma-separated key:value list, eg. \"-*- C++ -*-\":\"C Header\")", "args": { "name": "string", - "generators": { - "trigger": "_NuFrRa_(e,n)=>{let i=g(e),t=g(n);return i!==t}", - "getQueryTerm": "_NuFrRa_e=>{let n=g(e);return e.slice(n+1)}", - "script": "scc --languages", - "postProcess": "_NuFrRa_(e,n)=>{let{languages:i}=l(e),t=n[n.length-1];return u(t)?[]:i.map(s=>({name:s}))}" - } + "generatorName": "completions" } }, { @@ -299,12 +278,7 @@ "description": "Inspect files of unknown type and set its type by checking for a string (comma-separated key:value list, eg. \"-*- C++ -*-\":\"C Header\")", "args": { "name": "string", - "generators": { - "trigger": "_NuFrRa_(e,n)=>{let i=g(e),t=g(n);return i!==t}", - "getQueryTerm": "_NuFrRa_e=>{let n=g(e);return e.slice(n+1)}", - "script": "scc --languages", - "postProcess": "_NuFrRa_(e,n)=>{let{languages:i}=l(e),t=n[n.length-1];return u(t)?[]:i.map(s=>({name:s}))}" - } + "generatorName": "completions" } }, { diff --git a/command-signatures/json/sftp.json b/command-signatures/json/sftp.json index 8804520f..8b1ccd39 100644 --- a/command-signatures/json/sftp.json +++ b/command-signatures/json/sftp.json @@ -6,45 +6,25 @@ "name": "sources", "description": "File or directory, local or remote ([user@]host:[path])", "isVariadic": true, - "generators": [ - { - "script": "cat ~/.ssh/known_hosts", - "postProcess": "function(o,e){return o.split(`\n`).map(t=>{let n=r.exec(t);if(n)return String(n)}).filter((t,n,a)=>t&&a.indexOf(t)===n).map(t=>({name:(e[1].endsWith(\"@\")?e[1]:\"\")+t,description:\"SSH host\"}))}", - "trigger": "@" - }, - { - "script": "cat ~/.ssh/config", - "postProcess": "function(o){return o.split(`\n`).filter(e=>e.trim().startsWith(\"Host \")&&!e.includes(\"*\")).map(e=>({name:e.split(\" \")[1],description:\"SSH host\",priority:90}))}" - }, - { - "template": [ - "history", - "filepaths", - "folders" - ] - } + "template": [ + "filepaths", + "folders" + ], + "generatorName": [ + "cat_ssh_known_hosts", + "cat_ssh_config" ] }, { "name": "target", "description": "File or directory, local or remote ([user@]host:[path])", - "generators": [ - { - "script": "cat ~/.ssh/known_hosts", - "postProcess": "function(o,e){return o.split(`\n`).map(t=>{let n=r.exec(t);if(n)return String(n)}).filter((t,n,a)=>t&&a.indexOf(t)===n).map(t=>({name:(e[1].endsWith(\"@\")?e[1]:\"\")+t,description:\"SSH host\"}))}", - "trigger": "@" - }, - { - "script": "cat ~/.ssh/config", - "postProcess": "function(o){return o.split(`\n`).filter(e=>e.trim().startsWith(\"Host \")&&!e.includes(\"*\")).map(e=>({name:e.split(\" \")[1],description:\"SSH host\",priority:90}))}" - }, - { - "template": [ - "history", - "filepaths", - "folders" - ] - } + "template": [ + "filepaths", + "folders" + ], + "generatorName": [ + "cat_ssh_known_hosts", + "cat_ssh_config" ] } ], diff --git a/command-signatures/json/shortcuts.json b/command-signatures/json/shortcuts.json index 800f8429..87bac52f 100644 --- a/command-signatures/json/shortcuts.json +++ b/command-signatures/json/shortcuts.json @@ -8,10 +8,7 @@ "args": { "name": "shortcut-name", "description": "The name of the shortcut to run", - "generators": { - "script": "shortcuts list", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(t=>({name:t,icon:\"fig:///System/Applications/Shortcuts.app\"}))" - } + "generatorName": "list" }, "options": [ { @@ -83,10 +80,7 @@ "description": "The name of the folder to list", "args": { "name": "folder-name", - "generators": { - "script": "shortcuts list --folders", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(t=>({name:t,icon:\"\\u{1F4C2}\"}))" - } + "generatorName": "list_shortcuts" } }, { @@ -101,10 +95,7 @@ "args": { "name": "shortcut-name", "description": "The name of the shortcut to view", - "generators": { - "script": "shortcuts list", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(t=>({name:t,icon:\"fig:///System/Applications/Shortcuts.app\"}))" - } + "generatorName": "list" } }, { @@ -119,11 +110,7 @@ "description": "The shortcut file to sign", "args": { "name": "input", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let c=d.filter(({name:u=\"\",type:L})=>{if(i!==\"filter\"&&L===\"folder\")return i===\"always\";if(l.has(u)||o&&new RegExp(o.source,o.flags).test(u))return!0;let[,...h]=u.split(\".\");if(h.length>=1){let m=h.length-1,v=h[m];do{if(a.has(v))return!0;m-=1,v=[h[m],v].join(\".\")}while(m>=0)}return!1});return!s&&!r?c:c.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?s:r)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/softwareupdate.json b/command-signatures/json/softwareupdate.json index 1658a5ca..f765a0ad 100644 --- a/command-signatures/json/softwareupdate.json +++ b/command-signatures/json/softwareupdate.json @@ -26,15 +26,7 @@ "name": "label", "isVariadic": true, "isOptional": true, - "generators": { - "script": "softwareupdate --list", - "postProcess": "_NuFrRa_a=>a.split(`\n`).filter(e=>e.startsWith(\"* Label: \")).map(e=>{let t=e.substring(9);return{name:t,insertValue:`\"${t}\"`,description:\"Available update\"}})", - "scriptTimeout": 20000, - "cache": { - "strategy": "stale-while-revalidate", - "ttl": 7200000 - } - } + "generatorName": "completions" }, "options": [ { diff --git a/command-signatures/json/sqlite3.json b/command-signatures/json/sqlite3.json index f9e6ba95..f19bbd7d 100644 --- a/command-signatures/json/sqlite3.json +++ b/command-signatures/json/sqlite3.json @@ -6,10 +6,7 @@ }, "args": { "name": "FILENAME", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let c=m.filter(({name:u=\"\",type:j})=>{if(i!==\"filter\"&&j===\"folder\")return i===\"always\";if(d.has(u)||o&&new RegExp(o.source,o.flags).test(u))return!0;let[,...p]=u.split(\".\");if(p.length>=1){let h=p.length-1,v=p[h];do{if(s.has(v))return!0;h-=1,v=[p[h],v].join(\".\")}while(h>=0)}return!1});return!r&&!a?c:c.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" }, "options": [ { @@ -52,10 +49,7 @@ "description": "Read/process named file", "args": { "name": "FILENAME", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(m=[])=>{let c=m.filter(({name:u=\"\",type:j})=>{if(i!==\"filter\"&&j===\"folder\")return i===\"always\";if(d.has(u)||o&&new RegExp(o.source,o.flags).test(u))return!0;let[,...p]=u.split(\".\");if(p.length>=1){let h=p.length-1,v=p[h];do{if(s.has(v))return!0;h-=1,v=[p[h],v].join(\".\")}while(h>=0)}return!1});return!r&&!a?c:c.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?r:a)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/st2.json b/command-signatures/json/st2.json index 623497d4..54b7acd5 100644 --- a/command-signatures/json/st2.json +++ b/command-signatures/json/st2.json @@ -126,11 +126,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } } ], @@ -666,11 +662,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } } ], @@ -1112,11 +1104,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } } ], @@ -1352,11 +1340,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } }, { @@ -1484,11 +1468,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } }, { @@ -1881,11 +1861,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } }, { @@ -2729,11 +2705,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } }, { @@ -2888,11 +2860,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } } ], @@ -2982,11 +2950,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } } ], @@ -6959,11 +6923,7 @@ "description": "User under which to run the action (admins only)", "args": { "name": "USER", - "generators": { - "custom": "function(S,M){return B(this,null,function*(){let u=S.find(c=>c.includes(\":\")),P=S.find(c=>/^-.*n.*/.test(c)),A;return u?A=yield M(\"dscl . -list /Groups PrimaryGroupID | tr -s ' '| sort -r\"):A=yield M(\"dscl . -list /Users UniqueID | tr -s ' '| sort -r\"),A.split(`\n`).map(c=>c.split(\" \")).map(c=>({name:P?c[1]:c[0],description:u?`Group - ${P?c[0]:`gid: ${c[1]}`}`:`User - ${P?c[0]:`uid: ${c[1]}`}`,icon:u?\"\\u{1F465}\":\"\\u{1F464}\",priority:90}))})}", - "trigger": ":", - "getQueryTerm": ":" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/stepzen.json b/command-signatures/json/stepzen.json index 9fb10883..77e1d83e 100644 --- a/command-signatures/json/stepzen.json +++ b/command-signatures/json/stepzen.json @@ -39,10 +39,7 @@ "args": { "name": "endpoint", "description": "The StepZen endpoint", - "generators": { - "script": "stepzen list schemas", - "postProcess": "_NuFrRa_t=>{try{return JSON.parse(t).map(e=>({name:e,description:\"StepZen endpoint\"}))}catch(e){return[]}}" - } + "generatorName": "list_schemas" } }, { @@ -62,10 +59,7 @@ "args": { "name": "name", "description": "The name of the generator to import", - "generators": { - "script": "curl https://api.github.com/repos/steprz/stepzen-schemas/contents", - "postProcess": "_NuFrRa_t=>{try{return JSON.parse(t).filter(e=>e.type==\"dir\"&&!e.name.startsWith(\".\")).map(e=>({name:e.name,description:\"Stepzen schema\",icon:\"\\u{1F4E6}\"}))}catch(e){return[]}}" - } + "generatorName": "curl_https_api_github_com_repos_steprz_stepzen_schemas_contents" }, "options": [ { diff --git a/command-signatures/json/subl.json b/command-signatures/json/subl.json index 3ec99e02..2299a4a6 100644 --- a/command-signatures/json/subl.json +++ b/command-signatures/json/subl.json @@ -16,10 +16,7 @@ "description": "Load the given project", "args": { "name": "project", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let a=p.filter(({name:u=\"\",type:M})=>{if(i!==\"filter\"&&M===\"folder\")return i===\"always\";if(l.has(u)||o&&new RegExp(o.source,o.flags).test(u))return!0;let[,...h]=u.split(\".\");if(h.length>=1){let g=h.length-1,y=h[g];do{if(c.has(y))return!0;g-=1,y=[h[g],y].join(\".\")}while(g>=0)}return!1});return!r&&!s?a:a.map(u=>Object.assign(Object.assign({},u),(u.type===\"file\"?r:s)||{}))}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/sysctl.json b/command-signatures/json/sysctl.json index 1e1ef11a..cf46578a 100644 --- a/command-signatures/json/sysctl.json +++ b/command-signatures/json/sysctl.json @@ -62,9 +62,6 @@ "name": "Variable names (and values if available)", "isVariadic": true, "isOptional": true, - "generators": { - "script": "sysctl -A -N", - "postProcess": "_NuFrRa_e=>e.split(`\n`).map(a=>({name:a,description:\"Variable name\"}))" - } + "generatorName": "completions" } } diff --git a/command-signatures/json/tailscale.json b/command-signatures/json/tailscale.json index e6c1c6c4..1a77f17f 100644 --- a/command-signatures/json/tailscale.json +++ b/command-signatures/json/tailscale.json @@ -163,10 +163,7 @@ "description": "Show Tailscale IP addresses", "args": { "isOptional": true, - "generators": { - "script": "tailscale status --json", - "postProcess": "_NuFrRa_n=>Object.values(JSON.parse(n).Peer).map(t=>({name:`${t.DNSName.split(\".\")[0]}${e!=null?e:\"\"}`,displayName:t.HostName,description:t.OS}))" - } + "generatorName": "status" }, "options": [ { @@ -345,15 +342,8 @@ { "name": "file or host", "isVariadic": true, - "generators": [ - { - "script": "tailscale status --json", - "postProcess": "_NuFrRa_n=>Object.values(JSON.parse(n).Peer).map(t=>({name:`${t.DNSName.split(\".\")[0]}${e!=null?e:\"\"}`,displayName:t.HostName,description:t.OS}))" - }, - { - "template": "filepaths" - } - ] + "template": "filepaths", + "generatorName": "status" } ] }, diff --git a/command-signatures/json/task.json b/command-signatures/json/task.json index 723a9026..b5628223 100644 --- a/command-signatures/json/task.json +++ b/command-signatures/json/task.json @@ -6,10 +6,7 @@ "description": "Search criteria that select tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...f(a),...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" }, "subcommands": [ { @@ -20,10 +17,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -34,10 +28,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -48,10 +39,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -62,10 +50,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -76,10 +61,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -90,10 +72,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -104,10 +83,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -162,10 +138,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -176,10 +149,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -190,10 +160,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -204,10 +171,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -218,10 +182,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -232,10 +193,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -246,10 +204,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -264,10 +219,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -278,10 +230,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -292,10 +241,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -306,10 +252,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -320,10 +263,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -334,10 +274,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -352,10 +289,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -366,10 +300,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -380,10 +311,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -394,10 +322,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -408,10 +333,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -422,10 +344,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -436,10 +355,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -450,10 +366,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -464,10 +377,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -478,10 +388,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -492,10 +399,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -506,10 +410,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -520,10 +421,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -534,10 +432,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -548,10 +443,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -562,10 +454,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -578,10 +467,7 @@ "name": "Task", "description": "The task to delete", "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -591,10 +477,7 @@ "name": "mods", "description": "Changes to apply to the selected tasks", "isOptional": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -605,10 +488,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -619,10 +499,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -631,10 +508,7 @@ "args": { "name": "Task", "description": "The task to edit", - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return f(a)}" - } + "template": "filepaths" } }, { @@ -645,10 +519,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -659,10 +530,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -673,10 +541,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -687,10 +552,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -701,10 +563,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -715,10 +574,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...T(a),...m(),...g(),...u(),...y()]}" - } + "template": "filepaths" } }, { @@ -746,10 +602,7 @@ "description": "Changes to apply to the selected tasks", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } ] }, @@ -779,10 +632,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -793,10 +643,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { @@ -807,10 +654,7 @@ "description": "Task search criteria", "isOptional": true, "isVariadic": true, - "generators": { - "script": "function(e){return\"task export\"}", - "postProcess": "_NuFrRa_e=>{let a=JSON.parse(e);return[...l(a),...h(a),...m(),...g(),...u()]}" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/tccutil.json b/command-signatures/json/tccutil.json index e0dc4a25..a8bbffc0 100644 --- a/command-signatures/json/tccutil.json +++ b/command-signatures/json/tccutil.json @@ -151,14 +151,7 @@ { "name": "bundle id", "isOptional": true, - "generators": { - "scriptTimeout": 15000, - "cache": { - "strategy": "stale-while-revalidate" - }, - "script": "mdfind kMDItemContentTypeTree=com.apple.application-bundle -onlyin /Applications | while read line; do echo $(mdls -name kMDItemCFBundleIdentifier -r \"$line\") $line; done", - "postProcess": "_NuFrRa_s=>{let e=new Map(s.split(`\n`).map(n=>{let o=n.indexOf(\" \");return[n.slice(0,o),n.slice(o+1)]}));e.delete(\"(null)\");let i=[];for(let[n,o]of e.entries())i.push({name:n,description:o,icon:`fig://${o}`});return i}" - } + "generatorName": "mdfind_applications_while_read" } ] } diff --git a/command-signatures/json/terragrunt.json b/command-signatures/json/terragrunt.json index 6c07d00e..b8853b31 100644 --- a/command-signatures/json/terragrunt.json +++ b/command-signatures/json/terragrunt.json @@ -4026,10 +4026,7 @@ } ], "args": { - "generators": { - "script": "terragrunt state list", - "postProcess": "function(r){return r.includes(\"No state file was found!\")||r.includes(\"Error\")?[]:r.split(`\n`).map(t=>({name:t.replace(\"* \",\"\").trim(),icon:\"https://terragrunt.gruntwork.io/assets/img/favicon/favicon.ico\",description:\"Address\"}))}" - }, + "generatorName": "state_list", "name": "address" } }, @@ -5073,10 +5070,7 @@ "name": "delete", "description": "Delete the specified workspace", "args": { - "generators": { - "script": "terragrunt workspace list", - "postProcess": "function(r){return r.split(`\n`).map(t=>({name:t.replace(\"* \",\"\").trim(),icon:\"https://terragrunt.gruntwork.io/assets/img/favicon/favicon.ico\",description:\"Workspace\"}))}" - }, + "generatorName": "workspace_list", "name": "workspace name" }, "options": [ @@ -5134,10 +5128,7 @@ "name": "select", "description": "Change the current working workspace", "args": { - "generators": { - "script": "terragrunt workspace list", - "postProcess": "function(r){return r.split(`\n`).map(t=>({name:t.replace(\"* \",\"\").trim(),icon:\"https://terragrunt.gruntwork.io/assets/img/favicon/favicon.ico\",description:\"Workspace\"}))}" - } + "generatorName": "workspace_list" } } ] diff --git a/command-signatures/json/tfenv.json b/command-signatures/json/tfenv.json index ba137b3f..4e7ca9f7 100644 --- a/command-signatures/json/tfenv.json +++ b/command-signatures/json/tfenv.json @@ -12,10 +12,7 @@ "latest", "min-required" ], - "generators": { - "script": "tfenv list-remote", - "postProcess": "function(e){return e.split(`\n`).map(function(n){return{name:n,type:\"option\"}})}" - } + "generatorName": "list_remote" } }, { @@ -24,10 +21,7 @@ "args": { "name": "version", "description": "Installed Terraform Version", - "generators": { - "script": "tfenv list", - "postProcess": "function(e){return e.split(`\n`).map(n=>({name:n,description:\"Version\"}))}" - } + "generatorName": "list" } }, { @@ -36,10 +30,7 @@ "args": { "name": "version", "description": "Installed Terraform Version", - "generators": { - "script": "tfenv list", - "postProcess": "function(e){return e.split(`\n`).map(n=>({name:n,description:\"Version\"}))}" - } + "generatorName": "list" } }, { diff --git a/command-signatures/json/tfsec.json b/command-signatures/json/tfsec.json index c01a76e2..86df15dc 100644 --- a/command-signatures/json/tfsec.json +++ b/command-signatures/json/tfsec.json @@ -207,10 +207,7 @@ "description": "Specify a workspace for ignore limits (default \"default\")", "args": { "name": "workspace", - "generators": { - "script": "terraform workspace list", - "postProcess": "function(e){return e.split(`\n`).map(i=>({name:i.replace(\"*\",\"\").trim(),description:\"Terraform workspaces\"}))}" - } + "generatorName": "terraform_workspace_list" } } ], diff --git a/command-signatures/json/tldr.json b/command-signatures/json/tldr.json index 7c236df3..83ba0b88 100644 --- a/command-signatures/json/tldr.json +++ b/command-signatures/json/tldr.json @@ -2,10 +2,7 @@ "name": "tldr", "description": "A simpler man page than the existing man page", "args": { - "generators": { - "script": "_NuFrRa_()=>`ls -Al ${i} ${l} ${t} ${a} ${o} ${c} 2>/dev/null`", - "postProcess": "_NuFrRa_n=>n.split(`\n`).filter(e=>r.test(e)).map(e=>({name:e.split(\" \").at(-1).slice(0,-3),description:\"Tldr page\",icon:\"fig://icon?type=string\"}))" - } + "template": "filepaths" }, "options": [ { @@ -29,30 +26,21 @@ "name": "--linux", "description": "Show command page for Linux", "args": { - "generators": { - "script": "_NuFrRa_()=>`ls -Al ${t} 2>/dev/null`", - "postProcess": "_NuFrRa_n=>n.split(`\n`).filter(e=>r.test(e)).map(e=>({name:e.split(\" \").at(-1).slice(0,-3),description:\"Tldr page\",icon:\"fig://icon?type=string\"}))" - } + "template": "filepaths" } }, { "name": "--osx", "description": "Show command page for OSX", "args": { - "generators": { - "script": "_NuFrRa_()=>`ls -l ${a} 2>/dev/null`", - "postProcess": "_NuFrRa_n=>n.split(`\n`).filter(e=>r.test(e)).map(e=>({name:e.split(\" \").at(-1).slice(0,-3),description:\"Tldr page\",icon:\"fig://icon?type=string\"}))" - } + "template": "filepaths" } }, { "name": "--sunos", "description": "Show command page for SunOS", "args": { - "generators": { - "script": "_NuFrRa_()=>`ls -l ${o} 2>/dev/null`", - "postProcess": "_NuFrRa_n=>n.split(`\n`).filter(e=>r.test(e)).map(e=>({name:e.split(\" \").at(-1).slice(0,-3),description:\"Tldr page\",icon:\"fig://icon?type=string\"}))" - } + "template": "filepaths" } }, { @@ -84,10 +72,7 @@ ], "description": "Show the original markdown format page", "args": { - "generators": { - "script": "_NuFrRa_()=>`ls -Al ${i} ${l} ${t} ${a} ${o} ${c} 2>/dev/null`", - "postProcess": "_NuFrRa_n=>n.split(`\n`).filter(e=>r.test(e)).map(e=>({name:e.split(\" \").at(-1).slice(0,-3),description:\"Tldr page\",icon:\"fig://icon?type=string\"}))" - } + "template": "filepaths" } }, { diff --git a/command-signatures/json/tns.json b/command-signatures/json/tns.json index 8ad4c20f..dc169d36 100644 --- a/command-signatures/json/tns.json +++ b/command-signatures/json/tns.json @@ -237,13 +237,7 @@ "description": "Create a project using a predefined template", "args": { "name": "template", - "generators": { - "script": "curl https://api.github.com/repos/NativeScript/nativescript-app-templates/contents/packages", - "cache": { - "ttl": 8640000000 - }, - "postProcess": "_NuFrRa_r=>JSON.parse(r).map(s=>{let g=s==null?void 0:s.name;return{name:`@nativescript/${g}`,description:`Template ${g}`}})" - } + "generatorName": "curl_https_api_github_com_repos_nativescript_nativescript_app_templates_contents_packages" } }, { diff --git a/command-signatures/json/tokei.json b/command-signatures/json/tokei.json index 9e3f0b69..f88ffade 100644 --- a/command-signatures/json/tokei.json +++ b/command-signatures/json/tokei.json @@ -134,10 +134,7 @@ "description": "Filters output by language type, seperated by a comma. i.e. -t=Rust,Markdown", "args": { "name": "type", - "generators": { - "script": "tokei --languages", - "splitOn": "\n" - } + "generatorName": "completions" } } ] diff --git a/command-signatures/json/trex.json b/command-signatures/json/trex.json index 8a98a23c..c5598c15 100644 --- a/command-signatures/json/trex.json +++ b/command-signatures/json/trex.json @@ -55,10 +55,7 @@ "description": "Delete a package", "args": { "name": "package name", - "generators": { - "script": "cat import_map.json", - "postProcess": "function(n){if(n)try{let e=JSON.parse(n);if(e.imports)return Object.entries(e.imports).map(([a,t])=>({name:a,icon:\"\\u{1F996}\",description:t}))}catch(e){return[]}return[]}" - } + "generatorName": "cat_import_map_json" } }, { @@ -93,10 +90,7 @@ ], "args": { "name": "script alias", - "generators": { - "script": "cat run.json", - "postProcess": "function(n){if(n)try{let e=JSON.parse(n);if(e.scripts)return Object.entries(e.scripts).map(([a,t])=>({name:a,icon:\"\\u{1F680}\",description:\"trex script\"}))}catch(e){return[]}return[]}" - } + "generatorName": "cat_run_json" } }, { @@ -104,10 +98,7 @@ "description": "Remove a package or url from cache", "args": { "name": "package | url", - "generators": { - "script": "cat import_map.json", - "postProcess": "function(n){if(n)try{let e=JSON.parse(n);if(e.imports)return Object.entries(e.imports).map(([a,t])=>({name:a,icon:\"\\u{1F996}\",description:t}))}catch(e){return[]}return[]}" - } + "generatorName": "cat_import_map_json" } }, { diff --git a/command-signatures/json/trivy.json b/command-signatures/json/trivy.json index 93d493f7..0a011238 100644 --- a/command-signatures/json/trivy.json +++ b/command-signatures/json/trivy.json @@ -44,11 +44,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -83,11 +79,7 @@ "description": "Comma-separated list of vulnerability types (os,library) (default: \"os,library\") [$TRIVY_VULN_TYPE]", "args": { "name": "vulnType", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"os\",\"library\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "os,library" } }, @@ -96,11 +88,7 @@ "description": "Comma-separated list of what security issues to detect (vuln,config) (default: \"vuln\") [$TRIVY_SECURITY_CHECKS]", "args": { "name": "securityChecks", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"vuln\",\"config\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "vuln" } }, @@ -255,11 +243,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -294,11 +278,7 @@ "description": "Comma-separated list of vulnerability types (os,library) (default: \"os,library\") [$TRIVY_VULN_TYPE]", "args": { "name": "vulnType", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"os\",\"library\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "os,library" } }, @@ -307,11 +287,7 @@ "description": "Comma-separated list of what security issues to detect (vuln,config) (default: \"vuln\") [$TRIVY_SECURITY_CHECKS]", "args": { "name": "securityChecks", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"vuln\",\"config\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "vuln" } }, @@ -492,11 +468,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -531,11 +503,7 @@ "description": "Comma-separated list of vulnerability types (os,library) (default: \"os,library\") [$TRIVY_VULN_TYPE]", "args": { "name": "vulnType", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"os\",\"library\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "os,library" } }, @@ -544,11 +512,7 @@ "description": "Comma-separated list of what security issues to detect (vuln,config) (default: \"vuln\") [$TRIVY_SECURITY_CHECKS]", "args": { "name": "securityChecks", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"vuln\",\"config\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "vuln" } }, @@ -704,11 +668,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -807,11 +767,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -846,11 +802,7 @@ "description": "Comma-separated list of vulnerability types (os,library) (default: \"os,library\") [$TRIVY_VULN_TYPE]", "args": { "name": "vulnType", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"os\",\"library\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "os,library" } }, @@ -859,11 +811,7 @@ "description": "Comma-separated list of what security issues to detect (vuln,config) (default: \"vuln\") [$TRIVY_SECURITY_CHECKS]", "args": { "name": "securityChecks", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"vuln\",\"config\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "vuln" } }, @@ -1013,11 +961,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -1052,11 +996,7 @@ "description": "Comma-separated list of vulnerability types (os,library) (default: \"os,library\") [$TRIVY_VULN_TYPE]", "args": { "name": "vulnType", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"os\",\"library\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "os,library" } }, @@ -1065,11 +1005,7 @@ "description": "Comma-separated list of what security issues to detect (vuln,config) (default: \"vuln\") [$TRIVY_SECURITY_CHECKS]", "args": { "name": "securityChecks", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"vuln\",\"config\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "vuln" } }, @@ -1142,11 +1078,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, @@ -1336,11 +1268,7 @@ "description": "Severities of vulnerabilities to be displayed (comma separated) (default: \"UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL\") [$TRIVY_SEVERITY]", "args": { "name": "severity", - "generators": { - "getQueryTerm": ",", - "trigger": ",", - "custom": "_NuFrRa_n=>r(void 0,null,function*(){let t=[\"UNKNOWN\",\"LOW\",\"MEDIUM\",\"HIGH\",\"CRITICAL\"],i=[n[n.length-1]][0];return t.filter(e=>!i.split(\",\").includes(e)).map(e=>({name:e}))})" - }, + "template": "filepaths", "default": "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL" } }, diff --git a/command-signatures/json/truffle.json b/command-signatures/json/truffle.json index 8e7cc288..5efe328e 100644 --- a/command-signatures/json/truffle.json +++ b/command-signatures/json/truffle.json @@ -505,10 +505,7 @@ { "name": "path", "isOptional": true, - "template": "filepaths", - "generators": { - "template": "filepaths" - } + "template": "filepaths" } ], "options": [ diff --git a/command-signatures/json/ts-node.json b/command-signatures/json/ts-node.json index e63ebafc..4082dc41 100644 --- a/command-signatures/json/ts-node.json +++ b/command-signatures/json/ts-node.json @@ -43,10 +43,7 @@ "description": "Require module before executing", "args": { "name": "module", - "generators": { - "trigger": "_NuFrRa_e=>e===\"-g\"||e===\"--global\"", - "custom": "function(e,n){return M(this,null,function*(){var t,a;if(!e.includes(\"-g\")&&!e.includes(\"--global\")){let i=yield n(\"cat $(npm prefix)/package.json\"),o=JSON.parse(i),p=(t=o.dependencies)!=null?t:{},c=o.devDependencies,s=(a=o.optionalDependencies)!=null?a:{};return Object.assign(p,c,s),Object.keys(p).filter(d=>!e.some(h=>h===d)).map(d=>({name:d,icon:\"\\u{1F4E6}\",description:p[d]?\"dependency\":s[d]?\"optionalDependency\":\"devDependency\"}))}else return(yield n(\"ls -1 `npm root -g`\")).split(`\n`).map(o=>({name:o,icon:\"\\u{1F4E6}\",description:\"Global dependency\"}))})}" - } + "template": "filepaths" } }, { @@ -96,10 +93,7 @@ "description": "Specify TypeScript project location", "args": { "name": "project", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "function(e){return e.filter(n=>n.name.match(/.*\\.json$/g)||n.name.endsWith(\"/\")).map(n=>{let t=n.name.match(/.*\\.json?$/g),a=n.name.match(/tsconfig.json$/g);return W(T({},n),{priority:a?100:t&&76})})}" - } + "template": "filepaths" } }, { @@ -145,9 +139,7 @@ "description": "Specify working directory", "args": { "name": "cwd", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -171,9 +163,7 @@ "description": "Directory for scope parameter", "args": { "name": "directory", - "generators": { - "template": "folders" - } + "template": "folders" } }, { @@ -196,9 +186,6 @@ "args": { "name": "script", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(d=[])=>{let u=d.filter(({name:h=\"\",type:K})=>{if(i!==\"filter\"&&K===\"folder\")return i===\"always\";if(s.has(h)||a&&new RegExp(a.source,a.flags).test(h))return!0;let[,...j]=h.split(\".\");if(j.length>=1){let D=j.length-1,C=j[D];do{if(c.has(C))return!0;D-=1,C=[j[D],C].join(\".\")}while(D>=0)}return!1});return!o&&!p?u:u.map(h=>Object.assign(Object.assign({},h),(h.type===\"file\"?o:p)||{}))}" - } + "template": "filepaths" } } diff --git a/command-signatures/json/tsc.json b/command-signatures/json/tsc.json index bc6a1fd5..2fa53cec 100644 --- a/command-signatures/json/tsc.json +++ b/command-signatures/json/tsc.json @@ -659,9 +659,6 @@ "args": { "name": "tsc script", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(f=[])=>{let c=f.filter(({name:l=\"\",type:F})=>{if(n!==\"filter\"&&F===\"folder\")return n===\"always\";if(d.has(l)||r&&new RegExp(r.source,r.flags).test(l))return!0;let[,...u]=l.split(\".\");if(u.length>=1){let h=u.length-1,b=u[h];do{if(s.has(b))return!0;h-=1,b=[u[h],b].join(\".\")}while(h>=0)}return!1});return!a&&!o?c:c.map(l=>Object.assign(Object.assign({},l),(l.type===\"file\"?a:o)||{}))}" - } + "template": "filepaths" } } diff --git a/command-signatures/json/turbo.json b/command-signatures/json/turbo.json index 233f3d8f..ec9b60ff 100644 --- a/command-signatures/json/turbo.json +++ b/command-signatures/json/turbo.json @@ -71,10 +71,7 @@ "args": { "name": "tasks", "isVariadic": true, - "generators": { - "script": "until [[ ( -f turbo.json || $PWD = '/' ) ]]; do cd ..; done; cat turbo.json", - "postProcess": "_NuFrRa_o=>{let t;try{t=JSON.parse(o)}catch(i){return console.error(i),[]}return Object.entries(t.pipeline).map(([i,r])=>{let a=[];return\"dependsOn\"in r&&a.push(`depends on ${r.dependsOn.map(n=>`'${n}'`).join(\", \")}`),\"outputs\"in r&&a.push(`outputs ${r.outputs.map(n=>`'${n}'`).join(\", \")}`),{name:i,description:a.length>0?\"Task: \"+a.join(\", \"):\"Task\",icon:x}})}" - } + "generatorName": "until_turbo_json_do_cd" }, "options": [ { @@ -130,10 +127,7 @@ "requiresSeparator": true, "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=o,r=l(t);return r.startsWith(\"fatal:\")?[]:r.split(`\n`).filter(a=>!a.trim().startsWith(\"HEAD\")).map(a=>{let n=a.trim(),s=a.match(/\\S+/g);if(s.length>1){if(s[0]===\"*\")return a.includes(\"HEAD detached\")?null:{name:a.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};s[0]===\"+\"&&(n=a.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&n.startsWith(\"remotes/\")&&(n=n.slice(n.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:n,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { diff --git a/command-signatures/json/twilio.json b/command-signatures/json/twilio.json index 02187999..fa67fe03 100644 --- a/command-signatures/json/twilio.json +++ b/command-signatures/json/twilio.json @@ -12089,11 +12089,7 @@ "args": { "name": "command", "isOptional": true, - "generators": { - "getQueryTerm": ":", - "trigger": ":", - "custom": "_NuFrRa_o=>V(this,null,function*(){let d=o[o.length-1].split(n).slice(0,-1),m=a;for(let s of d){let i=m.find(r=>r.name===s);if(!(i!=null&&i.subcommands))return[];m=i.subcommands}return m.map(s=>{var r;let i=u({},s);return(r=i.type)!=null||(i.type=\"subcommand\"),i.insertValue=e.generatorShouldInsertSeparator&&s.subcommands?s.name+n:s.insertValue,i})})" - } + "template": "filepaths" } }, { @@ -12111,10 +12107,6 @@ "args": { "name": "command", "isOptional": true, - "generators": { - "getQueryTerm": ":", - "trigger": ":", - "custom": "_NuFrRa_o=>V(this,null,function*(){let d=o[o.length-1].split(n).slice(0,-1),m=a;for(let s of d){let i=m.find(r=>r.name===s);if(!(i!=null&&i.subcommands))return[];m=i.subcommands}return m.map(s=>{var r;let i=u({},s);return(r=i.type)!=null||(i.type=\"subcommand\"),i.insertValue=e.generatorShouldInsertSeparator&&s.subcommands?s.name+n:s.insertValue,i})})" - } + "template": "filepaths" } } diff --git a/command-signatures/json/vite.json b/command-signatures/json/vite.json index 43fcccc9..3896b791 100644 --- a/command-signatures/json/vite.json +++ b/command-signatures/json/vite.json @@ -138,10 +138,7 @@ "isPersistent": true, "args": { "name": "mode", - "generators": { - "script": "\\ls -l1A.env.*", - "splitOn": "\n" - } + "generatorName": "ls" } }, { diff --git a/command-signatures/json/vr.json b/command-signatures/json/vr.json index 3f531249..e261af39 100644 --- a/command-signatures/json/vr.json +++ b/command-signatures/json/vr.json @@ -7,13 +7,7 @@ "description": "Run a script", "args": { "name": "script", - "generators": { - "cache": { - "strategy": "stale-while-revalidate" - }, - "script": "NO_COLOR=1 vr", - "postProcess": "_NuFrRa_t=>{let r=[];try{let e=t.split(`\n`).filter(Boolean);for(let o=0;o{let r=[];try{let e=t.split(`\n`).filter(Boolean);for(let o=0;o{let r=[];try{let e=t.split(`\n`).filter(Boolean);for(let o=0;o location (defaults to -.vsix)", "args": { "name": "path", - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(l=[])=>{let h=l.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...b]=p.split(\".\");if(b.length>=1){let w=b.length-1,x=b[w];do{if(c.has(x))return!0;w-=1,x=[b[w],x].join(\".\")}while(w>=0)}return!1});return!a&&!r?h:h.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?a:r)||{}))}" - } + "template": "filepaths" } }, { @@ -102,10 +98,7 @@ "description": "The GitHub branch used to infer relative links in README.md. Can be overridden by --baseContentUrl and --baseImagesUrl", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=e,s=g(t);return s.startsWith(\"fatal:\")?[]:s.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let a=n.trim(),r=n.match(/\\S+/g);if(r.length>1){if(r[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};r[0]===\"+\"&&(a=n.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&a.startsWith(\"remotes/\")&&(a=a.slice(a.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:a,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -113,10 +106,7 @@ "description": "The GitLab branch used to infer relative links in README.md. Can be overridden by --baseContentUrl and --baseImagesUrl", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=e,s=g(t);return s.startsWith(\"fatal:\")?[]:s.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let a=n.trim(),r=n.match(/\\S+/g);if(r.length>1){if(r[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};r[0]===\"+\"&&(a=n.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&a.startsWith(\"remotes/\")&&(a=a.slice(a.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:a,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -235,11 +225,7 @@ "args": { "name": "paths", "isVariadic": true, - "template": "filepaths", - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(l=[])=>{let h=l.filter(({name:p=\"\",type:N})=>{if(n!==\"filter\"&&N===\"folder\")return n===\"always\";if(d.has(p)||s&&new RegExp(s.source,s.flags).test(p))return!0;let[,...b]=p.split(\".\");if(b.length>=1){let w=b.length-1,x=b[w];do{if(c.has(x))return!0;w-=1,x=[b[w],x].join(\".\")}while(w>=0)}return!1});return!a&&!r?h:h.map(p=>Object.assign(Object.assign({},p),(p.type===\"file\"?a:r)||{}))}" - } + "template": "filepaths" } }, { @@ -247,10 +233,7 @@ "description": "The GitHub branch used to infer relative links in README.md. Can be overridden by --baseContentUrl and --baseImagesUrl", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=e,s=g(t);return s.startsWith(\"fatal:\")?[]:s.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let a=n.trim(),r=n.match(/\\S+/g);if(r.length>1){if(r[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};r[0]===\"+\"&&(a=n.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&a.startsWith(\"remotes/\")&&(a=a.slice(a.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:a,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { @@ -258,10 +241,7 @@ "description": "The GitLab branch used to infer relative links in README.md. Can be overridden by --baseContentUrl and --baseImagesUrl", "args": { "name": "branch", - "generators": { - "script": "git --no-optional-locks branch -a --no-color --sort=-committerdate", - "postProcess": "_NuFrRa_t=>{let{insertWithoutRemotes:i=!1}=e,s=g(t);return s.startsWith(\"fatal:\")?[]:s.split(`\n`).filter(n=>!n.trim().startsWith(\"HEAD\")).map(n=>{let a=n.trim(),r=n.match(/\\S+/g);if(r.length>1){if(r[0]===\"*\")return n.includes(\"HEAD detached\")?null:{name:n.replace(\"*\",\"\").trim(),description:\"Current branch\",priority:100,icon:\"\\u2B50\\uFE0F\"};r[0]===\"+\"&&(a=n.replace(\"+\",\"\").trim())}let c=\"Branch\";return i&&a.startsWith(\"remotes/\")&&(a=a.slice(a.indexOf(\"/\",8)+1),c=\"Remote branch\"),{name:a,description:c,icon:\"fig://icon?type=git\",priority:75}})}" - } + "generatorName": "git_branch" } }, { diff --git a/command-signatures/json/vultr-cli.json b/command-signatures/json/vultr-cli.json index b3ca7170..f015540d 100644 --- a/command-signatures/json/vultr-cli.json +++ b/command-signatures/json/vultr-cli.json @@ -526,10 +526,7 @@ "isDangerous": true, "args": { "name": "instanceID", - "generators": { - "script": "vultr-cli instance list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).slice(1,-3).map(a=>({name:a.split(\"\t\")[0],description:a.split(\"\t\").slice(1,-4).join(\"\t\")}))" - } + "generatorName": "instance_list" } }, { @@ -537,10 +534,7 @@ "description": "Get info about a specific instance", "args": { "name": "instanceID", - "generators": { - "script": "vultr-cli instance list", - "postProcess": "_NuFrRa_n=>n.split(`\n`).slice(1,-3).map(a=>({name:a.split(\"\t\")[0],description:a.split(\"\t\").slice(1,-4).join(\"\t\")}))" - } + "generatorName": "instance_list" } }, { diff --git a/command-signatures/json/wasm-bindgen.json b/command-signatures/json/wasm-bindgen.json index a811846c..f0fdd0de 100644 --- a/command-signatures/json/wasm-bindgen.json +++ b/command-signatures/json/wasm-bindgen.json @@ -169,9 +169,6 @@ "name": "input", "description": "File name to output the compiled binary bindings", "isScript": true, - "generators": { - "template": "filepaths", - "filterTemplateSuggestions": "_NuFrRa_(p=[])=>{let d=p.filter(({name:c=\"\",type:I})=>{if(i!==\"filter\"&&I===\"folder\")return i===\"always\";if(u.has(c)||o&&new RegExp(o.source,o.flags).test(c))return!0;let[,...m]=c.split(\".\");if(m.length>=1){let g=m.length-1,w=m[g];do{if(a.has(w))return!0;g-=1,w=[m[g],w].join(\".\")}while(g>=0)}return!1});return!r&&!s?d:d.map(c=>Object.assign(Object.assign({},c),(c.type===\"file\"?r:s)||{}))}" - } + "template": "filepaths" } } diff --git a/command-signatures/json/watson.json b/command-signatures/json/watson.json index 1e139e8b..b6ab12fe 100644 --- a/command-signatures/json/watson.json +++ b/command-signatures/json/watson.json @@ -6,15 +6,9 @@ "name": "add", "description": "Add time to a project with tag(s) that was not tracked live", "args": { - "generators": [ - { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - }, - { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - } + "generatorName": [ + "projects", + "tags" ] }, "options": [ @@ -102,10 +96,7 @@ ], "description": "Reports activity only for the given project. You can add other projects by using this option several times", "args": { - "generators": { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - }, + "generatorName": "projects", "name": "PROJECT" } }, @@ -116,10 +107,7 @@ ], "description": "Reports activity only for frames containing the given tag. You can add several tags by using this option multiple times", "args": { - "generators": { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - }, + "generatorName": "tags", "name": "TAG" } }, @@ -258,10 +246,7 @@ "description": "Edit a frame", "args": { "name": "FRAME ID", - "generators": { - "script": "watson log --json --reverse", - "postProcess": "_NuFrRa_o=>JSON.parse(o).map(e=>({name:e.id.substring(0,7),icon:\"\\u23F2\",displayName:`${e.id.substring(0,7)} - ${e.project} - ${e.start}`}))" - } + "generatorName": "log" }, "options": [ { @@ -447,10 +432,7 @@ "description": "Logs activity only for the given project. You can add other projects by using this option several times", "args": { "name": "PROJECT", - "generators": { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - }, + "generatorName": "projects", "isVariadic": true } }, @@ -462,10 +444,7 @@ "description": "Logs activity only for frames containing the given tag. You can add several tags by using this option multiple times", "args": { "name": "TAG", - "generators": { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - }, + "generatorName": "tags", "isVariadic": true } }, @@ -474,10 +453,7 @@ "description": "Logs activity for all projects but the given ones. You can ignore several projects by using the option multiple times. Any given project will be ignored", "args": { "name": "PROJECT", - "generators": { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - }, + "generatorName": "projects", "isVariadic": true } }, @@ -486,10 +462,7 @@ "description": "Logs activity for all tags but the given ones. You can ignore several tags by using the option multiple times. Any given tag will be ignored", "args": { "name": "TAG", - "generators": { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - }, + "generatorName": "tags", "isVariadic": true } }, @@ -560,10 +533,7 @@ "description": "Remove a frame. You can specify the frame either by id or by position (ex: -1 for the last frame)", "args": { "name": "ID", - "generators": { - "script": "watson log --json --reverse", - "postProcess": "_NuFrRa_o=>JSON.parse(o).map(e=>({name:e.id.substring(0,7),icon:\"\\u23F2\",displayName:`${e.id.substring(0,7)} - ${e.project} - ${e.start}`}))" - } + "generatorName": "log" }, "options": [ { @@ -593,15 +563,9 @@ }, { "name": "OLD_NAME", - "generators": [ - { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - }, - { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - } + "generatorName": [ + "projects", + "tags" ] }, { @@ -731,10 +695,7 @@ "description": "Reports activity only for the given project. You can add other projects by using this option several times", "args": { "name": "PROJECT", - "generators": { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - } + "generatorName": "projects" } }, { @@ -745,10 +706,7 @@ "description": "Reports activity only for frames containing the given tag. You can add several tags by using this option multiple times", "args": { "name": "TAG", - "generators": { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - } + "generatorName": "tags" } }, { @@ -756,10 +714,7 @@ "description": "Reports activity for all projects but the given ones. You can ignore several projects by using the option multiple times. Any given project will be ignored", "args": { "name": "PROJECT", - "generators": { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - } + "generatorName": "projects" } }, { @@ -767,10 +722,7 @@ "description": "Reports activity for all tags but the given ones. You can ignore several tags by using the option multiple times. Any given tag will be ignored", "args": { "name": "TAG", - "generators": { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - } + "generatorName": "tags" } }, { @@ -821,10 +773,7 @@ "args": { "name": "FRAME", "isOptional": true, - "generators": { - "script": "watson log --json --reverse", - "postProcess": "_NuFrRa_o=>JSON.parse(o).map(e=>({name:e.id.substring(0,7),icon:\"\\u23F2\",displayName:`${e.id.substring(0,7)} - ${e.project} - ${e.start}`}))" - } + "generatorName": "log" }, "options": [ { @@ -862,15 +811,9 @@ "args": { "name": "ARGS", "isVariadic": true, - "generators": [ - { - "script": "watson projects", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F5C2}\"}))" - }, - { - "script": "watson tags", - "postProcess": "_NuFrRa_o=>o.split(`\n`).map(e=>({name:e,icon:\"\\u{1F3F7}\"}))" - } + "generatorName": [ + "projects", + "tags" ] }, "options": [ diff --git a/command-signatures/json/wd.json b/command-signatures/json/wd.json index a021ea4c..63f3112a 100644 --- a/command-signatures/json/wd.json +++ b/command-signatures/json/wd.json @@ -5,10 +5,7 @@ { "name": "point", "description": "Warp point to the specified directory", - "generators": { - "script": "cat ~/.warprc", - "postProcess": "_NuFrRa_i=>{let o=i.matchAll(/^(\\w+)/gm),t=[];for(let[n]of o)t.push({name:n,description:\"Warp point\",icon:\"\\u{1F518}\",priority:76});return t}" - } + "generatorName": "cat_warprc" }, { "name": "path", @@ -33,10 +30,7 @@ "name": "point", "description": "Name of the warp point to be removed", "isOptional": true, - "generators": { - "script": "cat ~/.warprc", - "postProcess": "_NuFrRa_i=>{let o=i.matchAll(/^(\\w+)/gm),t=[];for(let[n]of o)t.push({name:n,description:\"Warp point\",icon:\"\\u{1F518}\",priority:76});return t}" - } + "generatorName": "cat_warprc" } }, { @@ -46,10 +40,7 @@ "name": "point", "description": "Name of the warp point", "isOptional": true, - "generators": { - "script": "cat ~/.warprc", - "postProcess": "_NuFrRa_i=>{let o=i.matchAll(/^(\\w+)/gm),t=[];for(let[n]of o)t.push({name:n,description:\"Warp point\",icon:\"\\u{1F518}\",priority:76});return t}" - } + "generatorName": "cat_warprc" } }, { @@ -62,10 +53,7 @@ "args": { "name": "point", "description": "Name of the warp point", - "generators": { - "script": "cat ~/.warprc", - "postProcess": "_NuFrRa_i=>{let o=i.matchAll(/^(\\w+)/gm),t=[];for(let[n]of o)t.push({name:n,description:\"Warp point\",icon:\"\\u{1F518}\",priority:76});return t}" - } + "generatorName": "cat_warprc" } }, { @@ -74,10 +62,7 @@ "args": { "name": "point", "description": "Name of the warp point", - "generators": { - "script": "cat ~/.warprc", - "postProcess": "_NuFrRa_i=>{let o=i.matchAll(/^(\\w+)/gm),t=[];for(let[n]of o)t.push({name:n,description:\"Warp point\",icon:\"\\u{1F518}\",priority:76});return t}" - } + "generatorName": "cat_warprc" } }, { diff --git a/command-signatures/json/wifi-password.json b/command-signatures/json/wifi-password.json index 08d30c75..00397fee 100644 --- a/command-signatures/json/wifi-password.json +++ b/command-signatures/json/wifi-password.json @@ -3,10 +3,7 @@ "args": { "name": "SSID", "description": "The name for a Wi-Fi network", - "generators": { - "script": "networksetup -listallhardwareports | awk '/Wi-Fi/{getline; print $2}' | xargs networksetup -listpreferredwirelessnetworks", - "postProcess": "_NuFrRa_e=>e.split(`\n`).slice(1).map(i=>({name:i.trim()}))" - } + "generatorName": "networksetup_wi_fi_getline_print_networksetup" }, "description": "People ask you for the Wi-Fi password. Answer quickly. macOS only", "options": [ diff --git a/command-signatures/json/xcodeproj.json b/command-signatures/json/xcodeproj.json index afa62bfc..71fd4b7f 100644 --- a/command-signatures/json/xcodeproj.json +++ b/command-signatures/json/xcodeproj.json @@ -9,11 +9,7 @@ { "name": "PROJECT", "isOptional": true, - "template": "folders", - "generators": { - "template": "folders", - "filterTemplateSuggestions": "_NuFrRa_t=>t.map(e=>{let o=e.name.endsWith(\".xcodeproj/\");return a(s({},e),{priority:o&&76})})" - } + "template": "folders" }, { "name": "OUTPUT", @@ -39,19 +35,11 @@ "args": [ { "name": "PROJECT1", - "template": "folders", - "generators": { - "template": "folders", - "filterTemplateSuggestions": "_NuFrRa_t=>t.map(e=>{let o=e.name.endsWith(\".xcodeproj/\");return a(s({},e),{priority:o&&76})})" - } + "template": "folders" }, { "name": "PROJECT2", - "template": "folders", - "generators": { - "template": "folders", - "filterTemplateSuggestions": "_NuFrRa_t=>t.map(e=>{let o=e.name.endsWith(\".xcodeproj/\");return a(s({},e),{priority:o&&76})})" - } + "template": "folders" } ] }, @@ -76,10 +64,7 @@ "args": { "name": "PROJECT", "isOptional": true, - "generators": { - "template": "folders", - "filterTemplateSuggestions": "_NuFrRa_t=>t.map(e=>{let o=e.name.endsWith(\".xcodeproj/\");return a(s({},e),{priority:o&&76})})" - } + "template": "folders" } }, { @@ -101,10 +86,7 @@ ], "args": { "name": "PROJECT", - "generators": { - "template": "folders", - "filterTemplateSuggestions": "_NuFrRa_t=>t.map(e=>{let o=e.name.endsWith(\".xcodeproj/\");return a(s({},e),{priority:o&&76})})" - }, + "template": "folders", "isOptional": true } }, @@ -117,10 +99,7 @@ "description": "The Xcode project document to use", "args": { "name": "PATH", - "generators": { - "template": "folders", - "filterTemplateSuggestions": "_NuFrRa_t=>t.map(e=>{let o=e.name.endsWith(\".xcodeproj/\");return a(s({},e),{priority:o&&76})})" - } + "template": "folders" } } ], diff --git a/command-signatures/json/yarn.json b/command-signatures/json/yarn.json index c118a7d9..ffea8e91 100644 --- a/command-signatures/json/yarn.json +++ b/command-signatures/json/yarn.json @@ -2,6 +2,7 @@ "name": "yarn", "description": "Manage packages and run scripts", "generateSpec": "_NuFrRa_(e,n)=>h(void 0,null,function*(){let{script:a,postProcess:t}=R,p=t(yield n(a),e).map(({name:i})=>i).filter(i=>W.includes(i)).map(i=>({name:i===\"@redwoodjs/core\"?[\"redwood\",\"rw\"]:i,loadSpec:i===\"@redwoodjs/core\"?\"redwood\":i,icon:\"fig://icon?type=package\"}));return{name:\"yarn\",subcommands:p}})", + "aliasGenerator": "script_alias", "args": { "name": "script", @@ -492,14 +493,7 @@ "description": "Installs a package and any packages that it depends on", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_(e,n)=>n.startsWith(\"@\")?!(I(n)>1&&I(e)>1):!(n.includes(\"@\")&&e.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(e,n)=>h(void 0,null,function*(){let a=e[e.length-1];if(a===\"\")return[];let t=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${a}\"`,o=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${a.slice(0,-1)}`,p=s=>s[s.length-1]===\"@\"?n(o):n(t),i=a.startsWith(\"@\")?I(a)>1:a.includes(\"@\");try{let s=JSON.parse(yield p(a));if(i){let r=Object.entries(s[\"dist-tags\"]||{}).map(([l,f])=>({name:l,description:f}));return r.push(...Object.keys(s.versions).map(l=>({name:l})).reverse()),r}return s.results.map(r=>({name:r.package.name,description:r.package.description}))}catch(s){return console.error({error:s}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true }, @@ -1207,13 +1201,7 @@ "description": "Creates new projects from any create-* starter kits", "args": { "name": "cli", - "generators": { - "script": "function(e){return e[e.length-1]===\"\"?\"\":`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?q=${\"create-\"+e[e.length-1]}&size=20\"`}", - "cache": { - "ttl": 25920000 - }, - "postProcess": "function(e){try{return JSON.parse(e).results.map(n=>({name:n.package.name.substring(7),description:n.package.description}))}catch(n){return[]}}" - }, + "template": "filepaths", "loadSpec": "_NuFrRa_e=>h(void 0,null,function*(){return{name:\"create-\"+e,type:\"global\"}})", "isCommand": true }, @@ -1509,14 +1497,7 @@ "description": "Install globally packages on your operating system", "args": { "name": "package", - "generators": { - "trigger": "_NuFrRa_(e,n)=>n.startsWith(\"@\")?!(I(n)>1&&I(e)>1):!(n.includes(\"@\")&&e.includes(\"@\"))", - "getQueryTerm": "@", - "cache": { - "ttl": 172800000 - }, - "custom": "_NuFrRa_(e,n)=>h(void 0,null,function*(){let a=e[e.length-1];if(a===\"\")return[];let t=`curl -s -H \"Accept: application/json\" \"https://api.npms.io/v2/search?size=20&q=${a}\"`,o=`curl -s -H \"Accept: application/vnd.npm.install-v1+json\" https://registry.npmjs.org/${a.slice(0,-1)}`,p=s=>s[s.length-1]===\"@\"?n(o):n(t),i=a.startsWith(\"@\")?I(a)>1:a.includes(\"@\");try{let s=JSON.parse(yield p(a));if(i){let r=Object.entries(s[\"dist-tags\"]||{}).map(([l,f])=>({name:l,description:f}));return r.push(...Object.keys(s.versions).map(l=>({name:l})).reverse()),r}return s.results.map(r=>({name:r.package.name,description:r.package.description}))}catch(s){return console.error({error:s}),[]}})" - }, + "template": "filepaths", "debounce": true, "isVariadic": true } @@ -4936,6 +4917,7 @@ "name": "workspace", "description": "Manage workspace", "generateSpec": "_NuFrRa_(e,n)=>h(void 0,null,function*(){let t=(yield n(\"yarn --version\")).startsWith(\"1.\"),o=()=>h(void 0,null,function*(){let i=yield n(\"yarn workspaces info\"),s=i.indexOf(\"{\"),r=i.lastIndexOf(\"}\");return Object.entries(JSON.parse(i.slice(s,r+1))).map(([l,{location:f}])=>({name:l,location:f}))}),p=()=>h(void 0,null,function*(){return(yield n(\"yarn workspaces list --json\")).split(`\n`).map(s=>JSON.parse(s.trim()))});try{let s=(t?yield o():yield p()).map(({name:r,location:l})=>({name:r,description:\"Workspaces\",args:{name:\"script\",generators:{cache:{strategy:\"stale-while-revalidate\",ttl:6e4},script:`\\\\cat ${l}/package.json`,postProcess:function(f){if(f.trim()==\"\")return[];try{let A=JSON.parse(f).scripts;if(A)return Object.keys(A).map(G=>({name:G}))}catch(P){}return[]}}}}));return{name:\"workspace\",subcommands:s}}catch(i){console.error(i)}return{name:\"workspaces\"}})", + "args": { "name": "workspace", "description": "Workspace name", diff --git a/command-signatures/json/yo.json b/command-signatures/json/yo.json index 5b72939e..d9e864ad 100644 --- a/command-signatures/json/yo.json +++ b/command-signatures/json/yo.json @@ -3,10 +3,7 @@ "description": "Yeoman generator", "args": { "name": "generator", - "generators": { - "script": "yo --generators", - "postProcess": "function(n){try{return n.split(`\n`).filter(e=>e.trim()&&e!==\"Available Generators:\").map(e=>({name:e.trim(),icon:\"https://avatars.githubusercontent.com/u/1714870?v=4\",displayName:o(e),description:`${o(e)} Generator`,priority:100,options:[{name:\"--help\",description:`Help of \"${o(e)}\" generator`}]}))}catch(e){return console.error(e),[]}}" - }, + "generatorName": "completions", "suggestions": [ { "name": "doctor", diff --git a/command-signatures/json/youtube-dl.json b/command-signatures/json/youtube-dl.json index 8bbebd6d..ec2766a4 100644 --- a/command-signatures/json/youtube-dl.json +++ b/command-signatures/json/youtube-dl.json @@ -3,10 +3,7 @@ "description": "Download videos from YouTube", "args": { "name": "URL", - "generators": { - "script": "pbpaste", - "postProcess": "function(i){let e=new RegExp(\"^(https?://)?(www.)?(youtube.com|youtu.?be)/.+$\");try{if(e.test(i))return[{name:i,description:\"Clipboard\",icon:\"https://www.youtube.com/s/desktop/810941b4/img/favicon_32.png\"}]}catch(t){return console.error(t),[]}}" - }, + "generatorName": "pbpaste", "isVariadic": true }, "options": [ @@ -163,10 +160,7 @@ "description": "Playlist video to start at (default is 1)", "args": { "name": "NUMBER", - "generators": { - "script": "_NuFrRa_i=>`youtube-dl --flat-playlist -J ${i.filter(e=>e.includes(\"youtube.\"))}`", - "postProcess": "function(i){try{return JSON.parse(i).entries.map((e,t)=>({name:`${t+1} - ${e.title}`,description:e.uploader,insertValue:`${t+1}`,icon:\"https://www.youtube.com/s/desktop/810941b4/img/favicon_32.png\"}))}catch(e){return console.error(e),[]}}" - } + "template": "filepaths" } }, { @@ -174,10 +168,7 @@ "description": "Playlist video to end at (default is last)", "args": { "name": "NUMBER", - "generators": { - "script": "_NuFrRa_i=>`youtube-dl --flat-playlist -J ${i.filter(e=>e.includes(\"youtube.\"))}`", - "postProcess": "function(i){try{return JSON.parse(i).entries.map((e,t)=>({name:`${t+1} - ${e.title}`,description:e.uploader,insertValue:`${t+1}`,icon:\"https://www.youtube.com/s/desktop/810941b4/img/favicon_32.png\"}))}catch(e){return console.error(e),[]}}" - } + "template": "filepaths" } }, { @@ -185,10 +176,7 @@ "description": "Playlist video to end at (default is last)", "args": { "name": "ITEM_SPEC", - "generators": { - "script": "_NuFrRa_i=>`youtube-dl --flat-playlist -J ${i.filter(e=>e.includes(\"youtube.\"))}`", - "postProcess": "function(i){try{return JSON.parse(i).entries.map((e,t)=>({name:`${t+1} - ${e.title}`,description:e.uploader,insertValue:`${t+1}`,icon:\"https://www.youtube.com/s/desktop/810941b4/img/favicon_32.png\"}))}catch(e){return console.error(e),[]}}" - } + "template": "filepaths" } }, { @@ -782,9 +770,7 @@ "description": "Languages of the subtitles to download (optional) separated by commas", "args": { "name": "LANGS", - "generators": { - "getQueryTerm": "," - }, + "template": "filepaths", "suggestions": [ "af", "sq", @@ -947,10 +933,7 @@ "description": "Adobe Pass multiple-system operator (TV provider) identifier", "args": { "name": "MSO", - "generators": { - "script": "_NuFrRa_i=>`youtube-dl ${i.filter(e=>e.includes(\"youtube.\"))} --simulate --ap-list-mso | tail -n +3 | tr -s \" \"`", - "postProcess": "_NuFrRa_i=>i.split(`\n`).map(e=>{let[t,...o]=e.split(\" \");return{name:t,description:o.join(\" \")}})" - } + "template": "filepaths" } }, { diff --git a/command-signatures/src/generators/amplify.rs b/command-signatures/src/generators/amplify.rs new file mode 100644 index 00000000..8920f6ed --- /dev/null +++ b/command-signatures/src/generators/amplify.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("amplify").add_generator( + "env_list", + Generator::script( + CommandBuilder::single_command("amplify env list --json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/ansible_doc.rs b/command-signatures/src/generators/ansible_doc.rs new file mode 100644 index 00000000..b3ba2235 --- /dev/null +++ b/command-signatures/src/generators/ansible_doc.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("ansible-doc").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("ansible-doc --list --json 2>/dev/null"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/apt.rs b/command-signatures/src/generators/apt.rs index fbe55318..8680f984 100644 --- a/command-signatures/src/generators/apt.rs +++ b/command-signatures/src/generators/apt.rs @@ -1,4 +1,5 @@ /// Used for debian-based package managers like apt-get, aptitude, etc. +use super::fig_parse; use warp_completion_metadata::{ CommandBuilder, CommandSignatureGenerators, Generator, GeneratorResults, GeneratorResultsCollector, Priority, Suggestion, @@ -98,3 +99,21 @@ pub fn aptitude_generators() -> CommandSignatureGenerators { ), ) } + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("apt") + .add_generator( + "list", + Generator::script( + CommandBuilder::single_command("apt list --installed"), + fig_parse::lines, + ), + ) + .add_generator( + "list_upgradable", + Generator::script( + CommandBuilder::single_command("apt list --upgradable"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/assimp.rs b/command-signatures/src/generators/assimp.rs new file mode 100644 index 00000000..486e69d2 --- /dev/null +++ b/command-signatures/src/generators/assimp.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("assimp") + .add_generator( + "listexport", + Generator::script( + CommandBuilder::single_command("assimp listexport"), + fig_parse::lines, + ), + ) + .add_generator( + "listext", + Generator::script( + CommandBuilder::single_command("assimp listext"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/autojump.rs b/command-signatures/src/generators/autojump.rs new file mode 100644 index 00000000..a5aa91d0 --- /dev/null +++ b/command-signatures/src/generators/autojump.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("autojump").add_generator( + "cat", + Generator::script( + CommandBuilder::single_command(r#"cat "$HOME"/Library/autojump/autojump.txt"#), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/bat.rs b/command-signatures/src/generators/bat.rs new file mode 100644 index 00000000..95a884fe --- /dev/null +++ b/command-signatures/src/generators/bat.rs @@ -0,0 +1,65 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("bat") + .add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("bat --list-themes"), + fig_parse::lines, + ), + ) + .add_generator( + "completions_bat", + Generator::script( + CommandBuilder::single_command("bat --list-languages"), + fig_parse::lines, + ), + ) + .add_generator( + "unknow_dev_null_possible", + Generator::script( + CommandBuilder::single_command( + "bat --paging unknow 2>&1 >/dev/null | grep possible", + ), + fig_parse::lines, + ), + ) + .add_generator( + "unknow_dev_null_possible_bat", + Generator::script( + CommandBuilder::single_command( + "bat --decorations unknow 2>&1 >/dev/null | grep possible", + ), + fig_parse::lines, + ), + ) + .add_generator( + "unknow_dev_null_possible_color", + Generator::script( + CommandBuilder::single_command( + "bat --color unknow 2>&1 >/dev/null | grep possible", + ), + fig_parse::lines, + ), + ) + .add_generator( + "unknow_dev_null_possible_italic", + Generator::script( + CommandBuilder::single_command( + "bat --italic-text unknow 2>&1 >/dev/null | grep possible", + ), + fig_parse::lines, + ), + ) + .add_generator( + "unknow_dev_null_possible_wrap", + Generator::script( + CommandBuilder::single_command( + "bat --wrap unknow 2>&1 >/dev/null | grep possible", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/black.rs b/command-signatures/src/generators/black.rs new file mode 100644 index 00000000..1de6a599 --- /dev/null +++ b/command-signatures/src/generators/black.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("black").add_generator( + "gh_release_list_psf_black", + Generator::script( + CommandBuilder::single_command("gh release list --repo psf/black"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/cargo.rs b/command-signatures/src/generators/cargo.rs index e6901b98..f3286364 100644 --- a/command-signatures/src/generators/cargo.rs +++ b/command-signatures/src/generators/cargo.rs @@ -1,3 +1,4 @@ +use super::fig_parse; use std::collections::{HashMap, HashSet}; use warp_completion_metadata::{ @@ -152,4 +153,11 @@ pub fn generator() -> CommandSignatureGenerators { }, ), ) + .add_generator( + "read_manifest", + Generator::script( + CommandBuilder::single_command("cargo read-manifest"), + fig_parse::lines, + ), + ) } diff --git a/command-signatures/src/generators/checkov.rs b/command-signatures/src/generators/checkov.rs new file mode 100644 index 00000000..e9fa8024 --- /dev/null +++ b/command-signatures/src/generators/checkov.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("checkov").add_generator( + "git_branch", + Generator::script( + CommandBuilder::single_command("git branch --no-color"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/cmd_n.rs b/command-signatures/src/generators/cmd_n.rs new file mode 100644 index 00000000..0e1783c3 --- /dev/null +++ b/command-signatures/src/generators/cmd_n.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("n").add_generator( + "lsr", + Generator::script( + CommandBuilder::single_command("n lsr --all"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/copilot.rs b/command-signatures/src/generators/copilot.rs new file mode 100644 index 00000000..24875e83 --- /dev/null +++ b/command-signatures/src/generators/copilot.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("copilot").add_generator( + "cat_copilot_workspace", + Generator::script( + CommandBuilder::single_command("cat copilot/.workspace"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/cordova.rs b/command-signatures/src/generators/cordova.rs new file mode 100644 index 00000000..6c03ae20 --- /dev/null +++ b/command-signatures/src/generators/cordova.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("cordova") + .add_generator( + "cat_package_json", + Generator::script( + CommandBuilder::single_command("cat package.json"), + fig_parse::lines, + ), + ) + .add_generator( + "plugin_list", + Generator::script( + CommandBuilder::single_command("cordova plugin list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/deno.rs b/command-signatures/src/generators/deno.rs new file mode 100644 index 00000000..7456dac2 --- /dev/null +++ b/command-signatures/src/generators/deno.rs @@ -0,0 +1,29 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("deno") + .add_generator( + "curl_https_cdn_deno_land_deno_meta_versions_json", + Generator::script( + CommandBuilder::single_command( + "curl -sL 'https://cdn.deno.land/deno/meta/versions.json'", + ), + fig_parse::lines, + ), + ) + .add_generator( + "find_deno_bin_1_f", + Generator::script( + CommandBuilder::single_command(r"\find ~/.deno/bin -maxdepth 1 -perm -111 -type f"), + fig_parse::lines, + ), + ) + .add_generator( + "lint", + Generator::script( + CommandBuilder::single_command("deno lint --rules --json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/deployctl.rs b/command-signatures/src/generators/deployctl.rs new file mode 100644 index 00000000..e2772b4d --- /dev/null +++ b/command-signatures/src/generators/deployctl.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("deployctl").add_generator( + "curl_https_cdn_deno_land_deploy_meta_versions_json", + Generator::script( + CommandBuilder::single_command( + "curl -sL 'https://cdn.deno.land/deploy/meta/versions.json'", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/deta.rs b/command-signatures/src/generators/deta.rs new file mode 100644 index 00000000..69c0a68a --- /dev/null +++ b/command-signatures/src/generators/deta.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("deta").add_generator( + "node12_node14_python3_7_python3", + Generator::script( + CommandBuilder::single_command("echo node12, node14, python3.7, python3.9"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/dtm.rs b/command-signatures/src/generators/dtm.rs new file mode 100644 index 00000000..4514c617 --- /dev/null +++ b/command-signatures/src/generators/dtm.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("dtm").add_generator( + "list_plugins", + Generator::script( + CommandBuilder::single_command("dtm list plugins"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/eb.rs b/command-signatures/src/generators/eb.rs new file mode 100644 index 00000000..c5ea95c0 --- /dev/null +++ b/command-signatures/src/generators/eb.rs @@ -0,0 +1,9 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("eb").add_generator( + "list", + Generator::script(CommandBuilder::single_command("eb list"), fig_parse::lines), + ) +} diff --git a/command-signatures/src/generators/elm.rs b/command-signatures/src/generators/elm.rs new file mode 100644 index 00000000..b4d69344 --- /dev/null +++ b/command-signatures/src/generators/elm.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("elm") + .add_generator( + "curl_accept_encoding_gzip_https_package_elm_lang_org_search_json", + Generator::script( + CommandBuilder::single_command("curl -sH 'accept-encoding: gzip' https://package.elm-lang.org/search.json | gunzip"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/elm_review.rs b/command-signatures/src/generators/elm_review.rs new file mode 100644 index 00000000..6a59617d --- /dev/null +++ b/command-signatures/src/generators/elm_review.rs @@ -0,0 +1,9 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("elm-review").add_generator( + "echo", + Generator::script(CommandBuilder::single_command("echo"), fig_parse::lines), + ) +} diff --git a/command-signatures/src/generators/eslint.rs b/command-signatures/src/generators/eslint.rs new file mode 100644 index 00000000..ba6a1f03 --- /dev/null +++ b/command-signatures/src/generators/eslint.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("eslint") + .add_generator( + "ls_node_modules_root_global", + Generator::script( + CommandBuilder::single_command("{ ls node_modules ; ls $(npm root -g) ; ls $(yarn global dir)/node_modules/ ; } | cat"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/expo.rs b/command-signatures/src/generators/expo.rs new file mode 100644 index 00000000..ed6d04ce --- /dev/null +++ b/command-signatures/src/generators/expo.rs @@ -0,0 +1,27 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("expo") + .add_generator( + "sysctl_hw_ncpu", + Generator::script( + CommandBuilder::single_command("sysctl -n hw.ncpu"), + fig_parse::lines, + ), + ) + .add_generator( + "xcodebuild_ios_xcodeproj", + Generator::script( + CommandBuilder::single_command("xcodebuild -project ios/*.xcodeproj -list -json"), + fig_parse::lines, + ), + ) + .add_generator( + "xcrun_xctrace_list_devices", + Generator::script( + CommandBuilder::single_command("xcrun xctrace list devices"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/expo_cli.rs b/command-signatures/src/generators/expo_cli.rs new file mode 100644 index 00000000..8bc629ce --- /dev/null +++ b/command-signatures/src/generators/expo_cli.rs @@ -0,0 +1,27 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("expo-cli") + .add_generator( + "sysctl_hw_ncpu", + Generator::script( + CommandBuilder::single_command("sysctl -n hw.ncpu"), + fig_parse::lines, + ), + ) + .add_generator( + "xcodebuild_ios_xcodeproj", + Generator::script( + CommandBuilder::single_command("xcodebuild -project ios/*.xcodeproj -list -json"), + fig_parse::lines, + ), + ) + .add_generator( + "xcrun_xctrace_list_devices", + Generator::script( + CommandBuilder::single_command("xcrun xctrace list devices"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/ffmpeg.rs b/command-signatures/src/generators/ffmpeg.rs new file mode 100644 index 00000000..9c7b30f4 --- /dev/null +++ b/command-signatures/src/generators/ffmpeg.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("ffmpeg") + .add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("ffmpeg -codecs"), + fig_parse::lines, + ), + ) + .add_generator( + "completions_devices", + Generator::script( + CommandBuilder::single_command("ffmpeg -devices"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/fig_parse.rs b/command-signatures/src/generators/fig_parse.rs new file mode 100644 index 00000000..5685baa5 --- /dev/null +++ b/command-signatures/src/generators/fig_parse.rs @@ -0,0 +1,11 @@ +use warp_completion_metadata::{GeneratorResults, GeneratorResultsCollector, Suggestion}; + +/// One suggestion per non-empty trimmed line. +pub fn lines(output: &str) -> GeneratorResults { + output + .lines() + .map(str::trim) + .filter(|line| !line.is_empty()) + .map(Suggestion::new) + .collect_unordered_results() +} diff --git a/command-signatures/src/generators/fig_teams_latest.rs b/command-signatures/src/generators/fig_teams_latest.rs new file mode 100644 index 00000000..1311ec46 --- /dev/null +++ b/command-signatures/src/generators/fig_teams_latest.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("fig-teams@latest").add_generator( + "npx_fig_teams_latest_teams", + Generator::script( + CommandBuilder::single_command("npx -y fig-teams@latest teams ls --json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/fisher.rs b/command-signatures/src/generators/fisher.rs new file mode 100644 index 00000000..d2613619 --- /dev/null +++ b/command-signatures/src/generators/fisher.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("fisher").add_generator( + "fish_fisher_list", + Generator::script( + CommandBuilder::single_command("fish -c 'fisher list'"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/fly.rs b/command-signatures/src/generators/fly.rs new file mode 100644 index 00000000..a829bd4b --- /dev/null +++ b/command-signatures/src/generators/fly.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("fly") + .add_generator( + "flyctl_list_apps", + Generator::script( + CommandBuilder::single_command("flyctl list apps"), + fig_parse::lines, + ), + ) + .add_generator( + "flyctl_list_orgs", + Generator::script( + CommandBuilder::single_command("flyctl list orgs"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/flyctl.rs b/command-signatures/src/generators/flyctl.rs new file mode 100644 index 00000000..423f0cc0 --- /dev/null +++ b/command-signatures/src/generators/flyctl.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("flyctl") + .add_generator( + "list_apps", + Generator::script( + CommandBuilder::single_command("flyctl list apps"), + fig_parse::lines, + ), + ) + .add_generator( + "list_orgs", + Generator::script( + CommandBuilder::single_command("flyctl list orgs"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/fnm.rs b/command-signatures/src/generators/fnm.rs new file mode 100644 index 00000000..1ed3fbd1 --- /dev/null +++ b/command-signatures/src/generators/fnm.rs @@ -0,0 +1,17 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("fnm") + .add_generator( + "ls", + Generator::script(CommandBuilder::single_command("fnm ls"), fig_parse::lines), + ) + .add_generator( + "ls_remote", + Generator::script( + CommandBuilder::single_command("fnm ls-remote"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/fvm.rs b/command-signatures/src/generators/fvm.rs new file mode 100644 index 00000000..4d00c0b9 --- /dev/null +++ b/command-signatures/src/generators/fvm.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("fvm").add_generator( + "releases", + Generator::script( + CommandBuilder::single_command("fvm releases"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/gh.rs b/command-signatures/src/generators/gh.rs index 6443d25a..8a65602a 100644 --- a/command-signatures/src/generators/gh.rs +++ b/command-signatures/src/generators/gh.rs @@ -1,3 +1,4 @@ +use super::fig_parse; use lazy_static::lazy_static; use regex::Regex; use warp_completion_metadata::{ @@ -44,6 +45,21 @@ pub fn generator() -> CommandSignatureGenerators { .collect_unordered_results() }), ) + + .add_generator( + "api_graphql_string_viewer", + Generator::script( + CommandBuilder::single_command("gh api graphql --paginate -f query='query($endCursor: String) { viewer { repositories(first: 100, after: $endCursor) { nodes { isPrivate, nameWithOwner, description } pageInfo { hasNextPage endCursor }}}}' --jq '.data.viewer.repositories.nodes[]'"), + fig_parse::lines, + ), + ) + .add_generator( + "git_branch", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks branch -r --no-color --sort=-committerdate"), + fig_parse::lines, + ), + ) } lazy_static! { diff --git a/command-signatures/src/generators/git.rs b/command-signatures/src/generators/git.rs index 876cb882..3d1c69f2 100644 --- a/command-signatures/src/generators/git.rs +++ b/command-signatures/src/generators/git.rs @@ -1,3 +1,4 @@ +use super::fig_parse; use itertools::Itertools; use warp_completion_metadata::{ Alias, CommandBuilder, CommandSignatureGenerators, Generator, GeneratorName, GeneratorResults, @@ -1027,6 +1028,42 @@ pub fn generator() -> CommandSignatureGenerators { }, ), ) + + .add_generator( + "branches", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks branch --no-color --sort=-committerdate"), + fig_parse::lines, + ), + ) + .add_generator( + "branches_no", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks branch -a --no-color --sort=-committerdate"), + fig_parse::lines, + ), + ) + .add_generator( + "log", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks log --oneline"), + fig_parse::lines, + ), + ) + .add_generator( + "status", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks status --short"), + fig_parse::lines, + ), + ) + .add_generator( + "tag", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks tag --list --sort=-committerdate"), + fig_parse::lines, + ), + ) } #[cfg(test)] diff --git a/command-signatures/src/generators/gpg.rs b/command-signatures/src/generators/gpg.rs new file mode 100644 index 00000000..ef977e50 --- /dev/null +++ b/command-signatures/src/generators/gpg.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("gpg").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("gpg --version"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/hexo.rs b/command-signatures/src/generators/hexo.rs new file mode 100644 index 00000000..108c5fea --- /dev/null +++ b/command-signatures/src/generators/hexo.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("hexo").add_generator( + "list_post_draft", + Generator::script( + CommandBuilder::single_command("hexo list post | grep -E ^Draft"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/hugo.rs b/command-signatures/src/generators/hugo.rs new file mode 100644 index 00000000..0660addd --- /dev/null +++ b/command-signatures/src/generators/hugo.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("hugo").add_generator( + "ls_archetypes", + Generator::script( + CommandBuilder::single_command("ls ./archetypes/"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/hyper.rs b/command-signatures/src/generators/hyper.rs new file mode 100644 index 00000000..c97bf0d9 --- /dev/null +++ b/command-signatures/src/generators/hyper.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("hyper").add_generator( + "list", + Generator::script( + CommandBuilder::single_command("hyper list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/id.rs b/command-signatures/src/generators/id.rs new file mode 100644 index 00000000..0c709170 --- /dev/null +++ b/command-signatures/src/generators/id.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("id").add_generator( + "dscl_users", + Generator::script( + CommandBuilder::single_command("dscl . -list /Users | grep -v '^_'"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/ignite_cli.rs b/command-signatures/src/generators/ignite_cli.rs new file mode 100644 index 00000000..2137dcca --- /dev/null +++ b/command-signatures/src/generators/ignite_cli.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("ignite-cli").add_generator( + "ls_ignite_templates", + Generator::script( + CommandBuilder::single_command("ls ignite/templates"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/kool.rs b/command-signatures/src/generators/kool.rs new file mode 100644 index 00000000..764d4e7f --- /dev/null +++ b/command-signatures/src/generators/kool.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("kool") + .add_generator( + "docker_compose_config", + Generator::script( + CommandBuilder::single_command("docker-compose config --services"), + fig_parse::lines, + ), + ) + .add_generator( + "run", + Generator::script( + CommandBuilder::single_command("kool run --help"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/lerna.rs b/command-signatures/src/generators/lerna.rs new file mode 100644 index 00000000..67fed16d --- /dev/null +++ b/command-signatures/src/generators/lerna.rs @@ -0,0 +1,33 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("lerna") + .add_generator( + "git_branch", + Generator::script( + CommandBuilder::single_command("git branch --no-color"), + fig_parse::lines, + ), + ) + .add_generator( + "git_remote", + Generator::script( + CommandBuilder::single_command("git remote"), + fig_parse::lines, + ), + ) + .add_generator( + "list_while_read_p", + Generator::script( + CommandBuilder::single_command( + r"lerna list -p | while read p; do \cat $p/package.json && echo END done", + ), + fig_parse::lines, + ), + ) + .add_generator( + "ls", + Generator::script(CommandBuilder::single_command("lerna ls"), fig_parse::lines), + ) +} diff --git a/command-signatures/src/generators/limactl.rs b/command-signatures/src/generators/limactl.rs new file mode 100644 index 00000000..248ce681 --- /dev/null +++ b/command-signatures/src/generators/limactl.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("limactl").add_generator( + "list", + Generator::script( + CommandBuilder::single_command("limactl list --quiet"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/mackup.rs b/command-signatures/src/generators/mackup.rs new file mode 100644 index 00000000..62c5bfed --- /dev/null +++ b/command-signatures/src/generators/mackup.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("mackup").add_generator( + "list", + Generator::script( + CommandBuilder::single_command("mackup list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/mdfind.rs b/command-signatures/src/generators/mdfind.rs new file mode 100644 index 00000000..6244ea45 --- /dev/null +++ b/command-signatures/src/generators/mdfind.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("mdfind").add_generator( + "ls_library_saved_searches_savedsearch", + Generator::script( + CommandBuilder::single_command(r"ls -1A ~/Library/Saved\ Searches/*.savedSearch"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/meteor.rs b/command-signatures/src/generators/meteor.rs new file mode 100644 index 00000000..5368b124 --- /dev/null +++ b/command-signatures/src/generators/meteor.rs @@ -0,0 +1,27 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("meteor") + .add_generator( + "cat_meteor_packages", + Generator::script( + CommandBuilder::single_command("cat ./.meteor/packages"), + fig_parse::lines, + ), + ) + .add_generator( + "create", + Generator::script( + CommandBuilder::single_command("meteor create --list"), + fig_parse::lines, + ), + ) + .add_generator( + "list_platforms", + Generator::script( + CommandBuilder::single_command("meteor list-platforms"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/mix.rs b/command-signatures/src/generators/mix.rs new file mode 100644 index 00000000..7f441cee --- /dev/null +++ b/command-signatures/src/generators/mix.rs @@ -0,0 +1,9 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("mix").add_generator( + "help", + Generator::script(CommandBuilder::single_command("mix help"), fig_parse::lines), + ) +} diff --git a/command-signatures/src/generators/mod.rs b/command-signatures/src/generators/mod.rs index 2ecb6215..d6a47cc3 100644 --- a/command-signatures/src/generators/mod.rs +++ b/command-signatures/src/generators/mod.rs @@ -2,7 +2,91 @@ use std::collections::HashMap; use std::iter::FromIterator; use warp_completion_metadata::DynamicCompletionData; +mod amplify; +mod ansible_doc; +mod assimp; +mod autojump; +mod bat; +mod black; +mod checkov; +mod cmd_n; mod common; +mod copilot; +mod cordova; +mod deno; +mod deployctl; +mod deta; +mod dtm; +mod eb; +mod elm; +mod elm_review; +mod eslint; +mod expo; +mod expo_cli; +mod ffmpeg; +mod fig_parse; +mod fig_teams_latest; +mod fisher; +mod fly; +mod flyctl; +mod fnm; +mod fvm; +mod gpg; +mod hexo; +mod hugo; +mod hyper; +mod id; +mod ignite_cli; +mod kool; +mod lerna; +mod limactl; +mod mackup; +mod mdfind; +mod meteor; +mod mix; +mod mosh; +mod networkquality; +mod npx; +mod nr; +mod ns; +mod okteto; +mod op; +mod open; +mod pandoc; +mod pre_commit; +mod projj; +mod quickmail; +mod r; +mod rancher; +mod rclone; +mod redwood; +mod robot; +mod rush; +mod rushx; +mod rustup; +mod scc; +mod sftp; +mod shortcuts; +mod softwareupdate; +mod stepzen; +mod sysctl; +mod tailscale; +mod tccutil; +mod terragrunt; +mod tfenv; +mod tfsec; +mod tokei; +mod trex; +mod turbo; +mod vite; +mod vr; +mod vsce; +mod vultr_cli; +mod watson; +mod wd; +mod wifi_password; +mod yo; +mod youtube_dl; /// Used for debian-based package managers like apt-get, aptitude, etc. mod apt; @@ -172,6 +256,90 @@ pub fn dynamic_command_signature_data() -> HashMap CommandSignatureGenerators { + CommandSignatureGenerators::new("mosh") + .add_generator( + "cat_ssh_config", + Generator::script( + CommandBuilder::single_command("cat ~/.ssh/config"), + fig_parse::lines, + ), + ) + .add_generator( + "cat_ssh_known_hosts", + Generator::script( + CommandBuilder::single_command("cat ~/.ssh/known_hosts"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/networkquality.rs b/command-signatures/src/generators/networkquality.rs new file mode 100644 index 00000000..52818c1e --- /dev/null +++ b/command-signatures/src/generators/networkquality.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("networkquality").add_generator( + "networksetup", + Generator::script( + CommandBuilder::single_command("networksetup -listallhardwareports"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/npm.rs b/command-signatures/src/generators/npm.rs index a33890ba..36d70c88 100644 --- a/command-signatures/src/generators/npm.rs +++ b/command-signatures/src/generators/npm.rs @@ -1,3 +1,4 @@ +use super::fig_parse; use warp_completion_metadata::{ Alias, CommandBuilder, CommandSignatureGenerators, Generator, GeneratorResults, GeneratorResultsCollector, Suggestion, @@ -321,6 +322,14 @@ pub fn pnpm_generators() -> CommandSignatureGenerators { "workspace_packages_generator", workspace_packages_generator(), ) + + .add_generator( + "until_package_json_do_cd", + Generator::script( + CommandBuilder::single_command("until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json"), + fig_parse::lines, + ), + ) } pub fn yarn_generators() -> CommandSignatureGenerators { diff --git a/command-signatures/src/generators/npx.rs b/command-signatures/src/generators/npx.rs new file mode 100644 index 00000000..ab1d6742 --- /dev/null +++ b/command-signatures/src/generators/npx.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("npx") + .add_generator( + "until_node_modules_do_cd", + Generator::script( + CommandBuilder::single_command("until [[ -d node_modules/ ]] || [[ $PWD = '/' ]]; do cd ..; done; ls -1 node_modules/.bin/"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/nr.rs b/command-signatures/src/generators/nr.rs new file mode 100644 index 00000000..4a86e89d --- /dev/null +++ b/command-signatures/src/generators/nr.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("nr").add_generator( + "until_package_json_do_cd", + Generator::script( + CommandBuilder::single_command( + "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/ns.rs b/command-signatures/src/generators/ns.rs new file mode 100644 index 00000000..3a5b79f5 --- /dev/null +++ b/command-signatures/src/generators/ns.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("ns") + .add_generator( + "curl_https_api_github_com_repos_nativescript_nativescript_app_templates_contents_packages", + Generator::script( + CommandBuilder::single_command("curl https://api.github.com/repos/NativeScript/nativescript-app-templates/contents/packages"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/okteto.rs b/command-signatures/src/generators/okteto.rs new file mode 100644 index 00000000..c6e26770 --- /dev/null +++ b/command-signatures/src/generators/okteto.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("okteto") + .add_generator( + "context_list", + Generator::script( + CommandBuilder::single_command("okteto context list"), + fig_parse::lines, + ), + ) + .add_generator( + "namespace_list", + Generator::script( + CommandBuilder::single_command("okteto namespace list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/op.rs b/command-signatures/src/generators/op.rs new file mode 100644 index 00000000..c13c57bf --- /dev/null +++ b/command-signatures/src/generators/op.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("op").add_generator( + "account_list_json", + Generator::script( + CommandBuilder::single_command("op account list --format json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/open.rs b/command-signatures/src/generators/open.rs new file mode 100644 index 00000000..14c2bd46 --- /dev/null +++ b/command-signatures/src/generators/open.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("open") + .add_generator( + "mdfind", + Generator::script( + CommandBuilder::single_command("mdfind kMDItemContentTypeTree=com.apple.application-bundle -onlyin /"), + fig_parse::lines, + ), + ) + .add_generator( + "mdfind_while_read_line", + Generator::script( + CommandBuilder::single_command(r#"mdfind kMDItemContentTypeTree=com.apple.application-bundle -onlyin / | while read line; do echo $(mdls -name kMDItemCFBundleIdentifier -r "$line") $line; done"#), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/pandoc.rs b/command-signatures/src/generators/pandoc.rs new file mode 100644 index 00000000..22f0d094 --- /dev/null +++ b/command-signatures/src/generators/pandoc.rs @@ -0,0 +1,29 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("pandoc") + .add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("pandoc --list-output-formats"), + fig_parse::lines, + ), + ) + .add_generator( + "completions_list", + Generator::script( + CommandBuilder::single_command("pandoc --list-input-formats"), + fig_parse::lines, + ), + ) + .add_generator( + "pandoc", + Generator::script( + CommandBuilder::single_command( + "pandoc --list-input-formats && pandoc --list-output-formats", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/pre_commit.rs b/command-signatures/src/generators/pre_commit.rs new file mode 100644 index 00000000..4cfc2b78 --- /dev/null +++ b/command-signatures/src/generators/pre_commit.rs @@ -0,0 +1,45 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("pre-commit") + .add_generator( + "cat_pre_commit_config_yaml", + Generator::script( + CommandBuilder::single_command("cat .pre-commit-config.yaml"), + fig_parse::lines, + ), + ) + .add_generator( + "git_branch", + Generator::script( + CommandBuilder::single_command( + "git --no-optional-locks branch --no-color --sort=-committerdate", + ), + fig_parse::lines, + ), + ) + .add_generator( + "git_branch_no", + Generator::script( + CommandBuilder::single_command( + "git --no-optional-locks branch -a --no-color --sort=-committerdate", + ), + fig_parse::lines, + ), + ) + .add_generator( + "git_remote", + Generator::script( + CommandBuilder::single_command("git --no-optional-locks remote -v"), + fig_parse::lines, + ), + ) + .add_generator( + "git_rev_list", + Generator::script( + CommandBuilder::single_command("git rev-list --all --oneline"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/projj.rs b/command-signatures/src/generators/projj.rs new file mode 100644 index 00000000..1bba51fc --- /dev/null +++ b/command-signatures/src/generators/projj.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("projj") + .add_generator( + "cat_projj_cache_json", + Generator::script( + CommandBuilder::single_command("cat ~/.projj/cache.json"), + fig_parse::lines, + ), + ) + .add_generator( + "cat_projj_config_json", + Generator::script( + CommandBuilder::single_command("cat ~/.projj/config.json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/quickmail.rs b/command-signatures/src/generators/quickmail.rs new file mode 100644 index 00000000..ce226499 --- /dev/null +++ b/command-signatures/src/generators/quickmail.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("quickmail").add_generator( + "template_listall", + Generator::script( + CommandBuilder::single_command("quickmail template listall"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/r.rs b/command-signatures/src/generators/r.rs new file mode 100644 index 00000000..43df12a6 --- /dev/null +++ b/command-signatures/src/generators/r.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("r").add_generator( + "rscript_libpaths", + Generator::script( + CommandBuilder::single_command("Rscript -e '.libPaths()'"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/rancher.rs b/command-signatures/src/generators/rancher.rs new file mode 100644 index 00000000..94811388 --- /dev/null +++ b/command-signatures/src/generators/rancher.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("rancher").add_generator( + "server", + Generator::script( + CommandBuilder::single_command("rancher server ls"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/rclone.rs b/command-signatures/src/generators/rclone.rs new file mode 100644 index 00000000..17ead206 --- /dev/null +++ b/command-signatures/src/generators/rclone.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("rclone").add_generator( + "listremotes", + Generator::script( + CommandBuilder::single_command("rclone listremotes"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/redwood.rs b/command-signatures/src/generators/redwood.rs new file mode 100644 index 00000000..78a65b31 --- /dev/null +++ b/command-signatures/src/generators/redwood.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("redwood").add_generator( + "until_redwood_toml_do_cd", + Generator::script( + CommandBuilder::single_command( + "until [[ -f redwood.toml ]] || [[ $PWD = '/' ]]; do cd ..; done; ls -1p scripts/", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/robot.rs b/command-signatures/src/generators/robot.rs new file mode 100644 index 00000000..bc0c719d --- /dev/null +++ b/command-signatures/src/generators/robot.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("robot").add_generator( + "for_i_in_robot", + Generator::script( + CommandBuilder::single_command( + r#"for i in $(find -E . -regex ".*.robot" -type f); do cat -s $i ; done"#, + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/rush.rs b/command-signatures/src/generators/rush.rs new file mode 100644 index 00000000..687d34af --- /dev/null +++ b/command-signatures/src/generators/rush.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("rush").add_generator( + "until_rush_json_do_cd", + Generator::script( + CommandBuilder::single_command( + "until [[ -f rush.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat rush.json", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/rushx.rs b/command-signatures/src/generators/rushx.rs new file mode 100644 index 00000000..08b3dec0 --- /dev/null +++ b/command-signatures/src/generators/rushx.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("rushx").add_generator( + "until_package_json_do_cd", + Generator::script( + CommandBuilder::single_command( + "until [[ -f package.json ]] || [[ $PWD = '/' ]]; do cd ..; done; cat package.json", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/rustup.rs b/command-signatures/src/generators/rustup.rs new file mode 100644 index 00000000..66ebb6e1 --- /dev/null +++ b/command-signatures/src/generators/rustup.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("rustup") + .add_generator( + "find_docs_s_index_html", + Generator::script( + CommandBuilder::single_command(r#"find $(rustup docs --path | sed -e "s|index\.html|std|") $(rustup docs --path | sed -e "s|index\.html|alloc|") $(rustup docs --path | sed -e "s|index\.html|core|") | grep "\.html" | sed -E -e "s|^(.*)/html/||" -e "s|\.html||" -e "s|/|::|g" -e "s/constant\.|trait\.|struct\.|macro\.|fn\.|keyword\.|primitive\.|type\.|enum\.|union\.|traitalias\.|::index$|^(.*)::all$//" -e "/^$/d""#), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/scc.rs b/command-signatures/src/generators/scc.rs new file mode 100644 index 00000000..3b6e2c63 --- /dev/null +++ b/command-signatures/src/generators/scc.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("scc").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("scc --languages"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/sftp.rs b/command-signatures/src/generators/sftp.rs new file mode 100644 index 00000000..9af58fc9 --- /dev/null +++ b/command-signatures/src/generators/sftp.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("sftp") + .add_generator( + "cat_ssh_config", + Generator::script( + CommandBuilder::single_command("cat ~/.ssh/config"), + fig_parse::lines, + ), + ) + .add_generator( + "cat_ssh_known_hosts", + Generator::script( + CommandBuilder::single_command("cat ~/.ssh/known_hosts"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/shortcuts.rs b/command-signatures/src/generators/shortcuts.rs new file mode 100644 index 00000000..38e88e02 --- /dev/null +++ b/command-signatures/src/generators/shortcuts.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("shortcuts") + .add_generator( + "list", + Generator::script( + CommandBuilder::single_command("shortcuts list"), + fig_parse::lines, + ), + ) + .add_generator( + "list_shortcuts", + Generator::script( + CommandBuilder::single_command("shortcuts list --folders"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/softwareupdate.rs b/command-signatures/src/generators/softwareupdate.rs new file mode 100644 index 00000000..5d34c12e --- /dev/null +++ b/command-signatures/src/generators/softwareupdate.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("softwareupdate").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("softwareupdate --list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/stepzen.rs b/command-signatures/src/generators/stepzen.rs new file mode 100644 index 00000000..3c5ece01 --- /dev/null +++ b/command-signatures/src/generators/stepzen.rs @@ -0,0 +1,22 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("stepzen") + .add_generator( + "curl_https_api_github_com_repos_steprz_stepzen_schemas_contents", + Generator::script( + CommandBuilder::single_command( + "curl https://api.github.com/repos/steprz/stepzen-schemas/contents", + ), + fig_parse::lines, + ), + ) + .add_generator( + "list_schemas", + Generator::script( + CommandBuilder::single_command("stepzen list schemas"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/sysctl.rs b/command-signatures/src/generators/sysctl.rs new file mode 100644 index 00000000..eb21dba9 --- /dev/null +++ b/command-signatures/src/generators/sysctl.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("sysctl").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("sysctl -A -N"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/tailscale.rs b/command-signatures/src/generators/tailscale.rs new file mode 100644 index 00000000..7127e2dd --- /dev/null +++ b/command-signatures/src/generators/tailscale.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("tailscale").add_generator( + "status", + Generator::script( + CommandBuilder::single_command("tailscale status --json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/tccutil.rs b/command-signatures/src/generators/tccutil.rs new file mode 100644 index 00000000..8da14b42 --- /dev/null +++ b/command-signatures/src/generators/tccutil.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("tccutil") + .add_generator( + "mdfind_applications_while_read", + Generator::script( + CommandBuilder::single_command(r#"mdfind kMDItemContentTypeTree=com.apple.application-bundle -onlyin /Applications | while read line; do echo $(mdls -name kMDItemCFBundleIdentifier -r "$line") $line; done"#), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/terragrunt.rs b/command-signatures/src/generators/terragrunt.rs new file mode 100644 index 00000000..51870dc1 --- /dev/null +++ b/command-signatures/src/generators/terragrunt.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("terragrunt") + .add_generator( + "state_list", + Generator::script( + CommandBuilder::single_command("terragrunt state list"), + fig_parse::lines, + ), + ) + .add_generator( + "workspace_list", + Generator::script( + CommandBuilder::single_command("terragrunt workspace list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/tfenv.rs b/command-signatures/src/generators/tfenv.rs new file mode 100644 index 00000000..5ee63f98 --- /dev/null +++ b/command-signatures/src/generators/tfenv.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("tfenv") + .add_generator( + "list", + Generator::script( + CommandBuilder::single_command("tfenv list"), + fig_parse::lines, + ), + ) + .add_generator( + "list_remote", + Generator::script( + CommandBuilder::single_command("tfenv list-remote"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/tfsec.rs b/command-signatures/src/generators/tfsec.rs new file mode 100644 index 00000000..0881beb1 --- /dev/null +++ b/command-signatures/src/generators/tfsec.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("tfsec").add_generator( + "terraform_workspace_list", + Generator::script( + CommandBuilder::single_command("terraform workspace list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/tokei.rs b/command-signatures/src/generators/tokei.rs new file mode 100644 index 00000000..62deed07 --- /dev/null +++ b/command-signatures/src/generators/tokei.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("tokei").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("tokei --languages"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/trex.rs b/command-signatures/src/generators/trex.rs new file mode 100644 index 00000000..5dd5ee95 --- /dev/null +++ b/command-signatures/src/generators/trex.rs @@ -0,0 +1,20 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("trex") + .add_generator( + "cat_import_map_json", + Generator::script( + CommandBuilder::single_command("cat import_map.json"), + fig_parse::lines, + ), + ) + .add_generator( + "cat_run_json", + Generator::script( + CommandBuilder::single_command("cat run.json"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/turbo.rs b/command-signatures/src/generators/turbo.rs new file mode 100644 index 00000000..f19e85ca --- /dev/null +++ b/command-signatures/src/generators/turbo.rs @@ -0,0 +1,24 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("turbo") + .add_generator( + "git_branch", + Generator::script( + CommandBuilder::single_command( + "git --no-optional-locks branch -a --no-color --sort=-committerdate", + ), + fig_parse::lines, + ), + ) + .add_generator( + "until_turbo_json_do_cd", + Generator::script( + CommandBuilder::single_command( + "until [[ ( -f turbo.json || $PWD = '/' ) ]]; do cd ..; done; cat turbo.json", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/vite.rs b/command-signatures/src/generators/vite.rs new file mode 100644 index 00000000..15681a22 --- /dev/null +++ b/command-signatures/src/generators/vite.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("vite").add_generator( + "ls", + Generator::script( + CommandBuilder::single_command(r"\ls -l1A.env.*"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/vr.rs b/command-signatures/src/generators/vr.rs new file mode 100644 index 00000000..e822c96f --- /dev/null +++ b/command-signatures/src/generators/vr.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("vr").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("NO_COLOR=1 vr"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/vsce.rs b/command-signatures/src/generators/vsce.rs new file mode 100644 index 00000000..bffaba81 --- /dev/null +++ b/command-signatures/src/generators/vsce.rs @@ -0,0 +1,14 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("vsce").add_generator( + "git_branch", + Generator::script( + CommandBuilder::single_command( + "git --no-optional-locks branch -a --no-color --sort=-committerdate", + ), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/vultr_cli.rs b/command-signatures/src/generators/vultr_cli.rs new file mode 100644 index 00000000..252d14e6 --- /dev/null +++ b/command-signatures/src/generators/vultr_cli.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("vultr-cli").add_generator( + "instance_list", + Generator::script( + CommandBuilder::single_command("vultr-cli instance list"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/watson.rs b/command-signatures/src/generators/watson.rs new file mode 100644 index 00000000..e15c0d2e --- /dev/null +++ b/command-signatures/src/generators/watson.rs @@ -0,0 +1,27 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("watson") + .add_generator( + "log", + Generator::script( + CommandBuilder::single_command("watson log --json --reverse"), + fig_parse::lines, + ), + ) + .add_generator( + "projects", + Generator::script( + CommandBuilder::single_command("watson projects"), + fig_parse::lines, + ), + ) + .add_generator( + "tags", + Generator::script( + CommandBuilder::single_command("watson tags"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/wd.rs b/command-signatures/src/generators/wd.rs new file mode 100644 index 00000000..88823334 --- /dev/null +++ b/command-signatures/src/generators/wd.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("wd").add_generator( + "cat_warprc", + Generator::script( + CommandBuilder::single_command("cat ~/.warprc"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/wifi_password.rs b/command-signatures/src/generators/wifi_password.rs new file mode 100644 index 00000000..e08dff1a --- /dev/null +++ b/command-signatures/src/generators/wifi_password.rs @@ -0,0 +1,13 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("wifi-password") + .add_generator( + "networksetup_wi_fi_getline_print_networksetup", + Generator::script( + CommandBuilder::single_command("networksetup -listallhardwareports | awk '/Wi-Fi/{getline; print $2}' | xargs networksetup -listpreferredwirelessnetworks"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/yo.rs b/command-signatures/src/generators/yo.rs new file mode 100644 index 00000000..527e1e1d --- /dev/null +++ b/command-signatures/src/generators/yo.rs @@ -0,0 +1,12 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("yo").add_generator( + "completions", + Generator::script( + CommandBuilder::single_command("yo --generators"), + fig_parse::lines, + ), + ) +} diff --git a/command-signatures/src/generators/youtube_dl.rs b/command-signatures/src/generators/youtube_dl.rs new file mode 100644 index 00000000..fcf7d9fa --- /dev/null +++ b/command-signatures/src/generators/youtube_dl.rs @@ -0,0 +1,9 @@ +use super::fig_parse; +use warp_completion_metadata::{CommandBuilder, CommandSignatureGenerators, Generator}; + +pub fn generator() -> CommandSignatureGenerators { + CommandSignatureGenerators::new("youtube-dl").add_generator( + "pbpaste", + Generator::script(CommandBuilder::single_command("pbpaste"), fig_parse::lines), + ) +}