Skip to content

Are there some way to disable some command ? #29

Open

Description

@skyfore
const Command = require('common-bin')

class SubBin extends Command {
  constructor(args) {
    super(args)

    // For example load some commander
    this.load('path/to/command(include test, dev, cov)')
  }
}

class MyBin extends SubBin {
  constructor(args) {
    super(args)

    this.load('path/to/mycommand(include run)')
  }
}

module.exports = MyBin

So, My question is how can I disable some SubBin Command

问题就是我想仅仅继承于 SubBin 的一部分命令,但是其他的我又不想要,或者不想要在 help 里面显示出来,有没有提供 disable command 的接口?

Activity

  1. fengmk2 commented on Feb 9, 2022

    @fengmk2
    Member

    可以来提交一个 pr 实现一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions