@oclif/plugin-autocomplete
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -7,2 +7,8 @@ "use strict"; | ||
const base_1 = require("../../base"); | ||
function sanitizeDescription(description) { | ||
if (description === undefined) { | ||
return ''; | ||
} | ||
return description.replace(/`/g, '\\\\\\\`'); | ||
} | ||
class Create extends base_1.AutocompleteBase { | ||
@@ -81,3 +87,3 @@ async run() { | ||
id: c.id, | ||
description: c.description || '', | ||
description: sanitizeDescription(c.description || ''), | ||
flags: c.flags | ||
@@ -104,3 +110,3 @@ }); | ||
let valueCmpl = isBoolean ? '' : ':'; | ||
const completion = `--${name}[${f.description}]${valueCmpl}`; | ||
const completion = `--${name}[${sanitizeDescription(f.description)}]${valueCmpl}`; | ||
return `"${completion}"`; | ||
@@ -107,0 +113,0 @@ }) |
@@ -1,1 +0,1 @@ | ||
{"version":"0.1.1","commands":{"autocomplete:create":{"id":"autocomplete:create","description":"create autocomplete setup scripts and completion functions","pluginName":"@oclif/plugin-autocomplete","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[]},"autocomplete":{"id":"autocomplete","description":"display autocomplete installation instructions","pluginName":"@oclif/plugin-autocomplete","pluginType":"core","aliases":[],"examples":["$ <%= config.bin %> autocomplete","$ <%= config.bin %> autocomplete bash","$ <%= config.bin %> autocomplete zsh","$ <%= config.bin %> autocomplete --refresh-cache"],"flags":{"refresh-cache":{"name":"refresh-cache","type":"boolean","char":"r","description":"Refresh cache (ignores displaying instructions)"}},"args":[{"name":"shell","description":"shell type","required":false}]},"autocomplete:script":{"id":"autocomplete:script","description":"outputs autocomplete config script for shells","pluginName":"@oclif/plugin-autocomplete","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[{"name":"shell","description":"shell type","required":false}]}}} | ||
{"version":"0.1.2","commands":{"autocomplete:create":{"id":"autocomplete:create","description":"create autocomplete setup scripts and completion functions","pluginName":"@oclif/plugin-autocomplete","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[]},"autocomplete":{"id":"autocomplete","description":"display autocomplete installation instructions","pluginName":"@oclif/plugin-autocomplete","pluginType":"core","aliases":[],"examples":["$ <%= config.bin %> autocomplete","$ <%= config.bin %> autocomplete bash","$ <%= config.bin %> autocomplete zsh","$ <%= config.bin %> autocomplete --refresh-cache"],"flags":{"refresh-cache":{"name":"refresh-cache","type":"boolean","char":"r","description":"Refresh cache (ignores displaying instructions)"}},"args":[{"name":"shell","description":"shell type","required":false}]},"autocomplete:script":{"id":"autocomplete:script","description":"outputs autocomplete config script for shells","pluginName":"@oclif/plugin-autocomplete","pluginType":"core","hidden":true,"aliases":[],"flags":{},"args":[{"name":"shell","description":"shell type","required":false}]}}} |
{ | ||
"name": "@oclif/plugin-autocomplete", | ||
"description": "autocomplete plugin for oclif", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"author": "Philipe Navarro @RasPhilCo", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/plugin-autocomplete/issues", |
@@ -44,3 +44,3 @@ @oclif/plugin-autocomplete | ||
_See code: [src/commands/autocomplete/index.ts](https://github.com/oclif/plugin-autocomplete/blob/v0.1.1/src/commands/autocomplete/index.ts)_ | ||
_See code: [src/commands/autocomplete/index.ts](https://github.com/oclif/plugin-autocomplete/blob/v0.1.2/src/commands/autocomplete/index.ts)_ | ||
<!-- commandsstop --> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19900
401