Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cmdln

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmdln - npm Package Compare versions

Comparing version 4.1.2 to 4.2.0

8

CHANGES.md

@@ -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)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc