Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions command-signatures/json/amplify.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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"
}
}
]
Expand All @@ -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"
}
},
{
Expand All @@ -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"
}
}
]
Expand Down
5 changes: 1 addition & 4 deletions command-signatures/json/ansible-doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 1 addition & 4 deletions command-signatures/json/ansible-playbook.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
78 changes: 11 additions & 67 deletions command-signatures/json/apt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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"
}
},
{
Expand All @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
Expand Down
15 changes: 3 additions & 12 deletions command-signatures/json/assimp.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand All @@ -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"
}
},
{
Expand Down Expand Up @@ -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"
}
},
{
Expand Down
35 changes: 7 additions & 28 deletions command-signatures/json/bat.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
"description": "Explicitly set the language for syntax highlighting",
"args": {
"name": "<language>",
"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"
}
},
{
Expand Down Expand Up @@ -78,10 +75,7 @@
"description": "Specify when to use colored output",
"args": {
"name": "<mode>",
"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"
}
},
{
Expand All @@ -104,32 +98,23 @@
"description": "Specify when to use colored output",
"args": {
"name": "<when>",
"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"
}
},
{
"name": "--italic-text",
"description": "Specify when to use ANSI sequences for italic text in the output",
"args": {
"name": "<when>",
"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"
}
},
{
"name": "--decorations",
"description": "Specify when to use the decorations that have been specified via '--style'",
"args": {
"name": "<when>",
"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"
}
},
{
Expand All @@ -144,10 +129,7 @@
"description": "Specify when to use the pager",
"args": {
"name": "<when>",
"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"
}
},
{
Expand Down Expand Up @@ -182,10 +164,7 @@
"description": "Set the theme for syntax highlighting",
"args": {
"name": "<theme>",
"generators": {
"script": "bat --list-themes",
"postProcess": "function(t){return t.split(`\n`).map(e=>({name:e,description:\"theme: \"+e}))}"
}
"generatorName": "completions"
}
},
{
Expand Down
8 changes: 1 addition & 7 deletions command-signatures/json/black.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
8 changes: 2 additions & 6 deletions command-signatures/json/brew.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down Expand Up @@ -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"
}
},
{
Expand Down
Loading
Loading