@oclif/plugin-which
Advanced tools
@@ -7,4 +7,10 @@ "use strict"; | ||
| const { argv } = await this.parse(Which); | ||
| const cmd = this.config.findCommand(argv.join(':'), { must: true }); | ||
| core_1.CliUx.ux.styledHeader(cmd.id); | ||
| let command = argv; | ||
| if (argv.length === 1 && typeof argv[0] === 'string') { | ||
| // If this if statement is true then the command to find was passed in as a single string, e.g. `mycli which "my command"` | ||
| // So we must use the topicSeparator to split it into an array | ||
| command = argv[0].split(this.config.topicSeparator); | ||
| } | ||
| const cmd = this.config.findCommand(command.join(':'), { must: true }); | ||
| core_1.CliUx.ux.styledHeader(command.join(this.config.topicSeparator)); | ||
| core_1.CliUx.ux.styledObject({ | ||
@@ -11,0 +17,0 @@ plugin: cmd.pluginName, |
@@ -1,1 +0,1 @@ | ||
| {"version":"2.1.1","commands":{"which":{"id":"which","description":"Show which plugin a command is in.","strict":false,"pluginName":"@oclif/plugin-which","pluginAlias":"@oclif/plugin-which","pluginType":"core","aliases":[],"flags":{},"args":[]}}} | ||
| {"version":"2.2.0","commands":{"which":{"id":"which","description":"Show which plugin a command is in.","strict":false,"pluginName":"@oclif/plugin-which","pluginAlias":"@oclif/plugin-which","pluginType":"core","aliases":[],"flags":{},"args":[]}}} |
+7
-6
| { | ||
| "name": "@oclif/plugin-which", | ||
| "description": "find which plugin a command is in", | ||
| "version": "2.1.1", | ||
| "version": "2.2.0", | ||
| "author": "Salesforce", | ||
@@ -12,7 +12,7 @@ "bugs": "https://github.com/oclif/plugin-which/issues", | ||
| "devDependencies": { | ||
| "@oclif/plugin-help": "^5.1.15", | ||
| "@oclif/test": "^2.2.3", | ||
| "@oclif/plugin-help": "^5.1.17", | ||
| "@oclif/test": "^2.2.6", | ||
| "@types/chai": "^4.3.1", | ||
| "@types/mocha": "^9", | ||
| "@types/node": "^14.18.32", | ||
| "@types/node": "^14.18.33", | ||
| "chai": "^4.2.0", | ||
@@ -26,2 +26,3 @@ "eslint": "^7.32.0", | ||
| "oclif": "^2.6.3", | ||
| "shx": "^0.3.4", | ||
| "ts-node": "^9.0.0", | ||
@@ -51,3 +52,3 @@ "typescript": "4.6.4" | ||
| "scripts": { | ||
| "postpack": "rm -f oclif.manifest.json", | ||
| "postpack": "shx rm -f oclif.manifest.json", | ||
| "posttest": "yarn lint", | ||
@@ -59,5 +60,5 @@ "prepack": "yarn build && oclif manifest . && oclif readme", | ||
| "pretest": "yarn build && tsc -p test --noEmit", | ||
| "build": "rm -rf lib && tsc" | ||
| "build": "shx rm -rf lib && tsc" | ||
| }, | ||
| "main": "lib/index.js" | ||
| } |
+2
-2
@@ -23,3 +23,3 @@ @oclif/plugin-which | ||
| $ oclif-example (--version) | ||
| @oclif/plugin-which/2.1.1 linux-x64 node-v16.17.1 | ||
| @oclif/plugin-which/2.2.0 linux-x64 node-v18.12.0 | ||
| $ oclif-example --help [COMMAND] | ||
@@ -47,3 +47,3 @@ USAGE | ||
| _See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v2.1.1/src/commands/which.ts)_ | ||
| _See code: [src/commands/which.ts](https://github.com/oclif/plugin-which/blob/v2.2.0/src/commands/which.ts)_ | ||
| <!-- commandsstop --> |
5659
8.49%33
22.22%16
6.67%