Comparing version 4.1.2 to 4.2.0
@@ -5,4 +5,8 @@ # node-cmdln Changelog | ||
(nothing yet) | ||
## 4.2.0 | ||
- Expose the `includeHidden` option to `Cmdln#bashCompletion()`. It is passed | ||
through to `Cmdln#bashCompletionSpec()`. Also correct a bug where | ||
`includeHidden` did not propagate to nested subcommands. | ||
## 4.1.2 | ||
@@ -193,3 +197,3 @@ | ||
- `<MyCLI instance>.bashCompletions()` will generate bash completions | ||
- `<MyCLI instance>.bashCompletion()` will generate bash completions | ||
for the `MyCLI` tool. You can add, e.g., a 'completion(s)' command | ||
@@ -196,0 +200,0 @@ to your CLI for users to run. Or you could generate completions |
@@ -828,3 +828,6 @@ /* | ||
// This is a `Cmdln` subclass, i.e. a sub-CLI. | ||
var subspec = handler.bashCompletionSpec({context: context_}); | ||
var subspec = handler.bashCompletionSpec({ | ||
context: context_, | ||
includeHidden: opts.includeHidden | ||
}); | ||
if (subspec) { | ||
@@ -858,2 +861,7 @@ spec.push(subspec); | ||
* "node-dashdash/examples/ddcompletion.js" for an example. | ||
* @param opts.includeHidden {Boolean} Optional. Default false. By default | ||
* hidden options and subcmds are "excluded". Here excluded means they | ||
* won't be offered as a completion, but if used, their argument type | ||
* will be completed. "Hidden" options and subcmds are ones with the | ||
* `hidden: true` attribute to exclude them from default help output. | ||
*/ | ||
@@ -866,2 +874,3 @@ Cmdln.prototype.bashCompletion = function bashCompletion(opts) { | ||
assert.optionalString(opts.specExtra, 'opts.specExtra'); | ||
assert.optionalBool(opts.includeHidden, 'opts.includeHidden'); | ||
@@ -872,3 +881,3 @@ // Gather template data. | ||
date: new Date(), | ||
spec: this.bashCompletionSpec() | ||
spec: this.bashCompletionSpec({includeHidden: opts.includeHidden}) | ||
}; | ||
@@ -875,0 +884,0 @@ if (opts.specExtra) { |
{ | ||
"name": "cmdln", | ||
"version": "4.1.2", | ||
"version": "4.2.0", | ||
"description": "helper lib for creating CLI tools with subcommands; think `git`, `svn`, `zfs`", | ||
@@ -5,0 +5,0 @@ "author": "Trent Mick (http://trentm.com)", |
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
90670
1374