Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

cli: doc: OPTIONS output not working #331

Closed
RichardLitt opened this issue Jun 27, 2016 · 5 comments · Fixed by #390
Closed

cli: doc: OPTIONS output not working #331

RichardLitt opened this issue Jun 27, 2016 · 5 comments · Fixed by #390
Assignees

Comments

@RichardLitt
Copy link
Member

RichardLitt commented Jun 27, 2016

When I run the --help command in the CLI for js-ipfs commands, I get the following:

$ node src/cli/bin.js id --help
Usage: bin.js id [OPTIONS]

  Shows IPFS Node ID info

What does [OPTIONS] mean? Shouldn't it show the options? Let's look at id.js:

module.exports = Command.extend({
  desc: 'Shows IPFS Node ID infos',

  options: {
    format: {
      alias: 'f',
      type: 'string'
    }
  },

  run: (name) => {
    ...
  }
})

Why isn't [--format | -f] output?

@daviddias
Copy link
Member

Unfortunately that is not a given for free with ronin, the CLI toolkit we use.

@dignifiedquire
Copy link
Member

We should really fix this and probably switch away from ronin. Which is simply not being maintained anymore.

RichardLitt added a commit that referenced this issue Jun 30, 2016
This makes the OPTIONS output a bit better. See #331. Do not merge this, for now, as we may be replacing the js- and go-ipfs docs with an intermediary; storing this here as an example of how to implement help in [ronin](https://www.npmjs.com/package/ronin)
@RichardLitt
Copy link
Member Author

PRed a pretty easy fix for this. However, let's wait until we resolve ipfs/notes#139.

@RichardLitt RichardLitt added the status/deferred Conscious decision to pause or backlog label Jun 30, 2016
@daviddias
Copy link
Member

@dignifiedquire we can collaborate to make it better - vadimdemedes/ronin#37

@dignifiedquire
Copy link
Member

Tbh it does not look like anything is happening on ronin. But there is yargs, which looks really awesome and also allows for the command structure that we are after, see here for an example.

@dignifiedquire dignifiedquire self-assigned this Aug 2, 2016
@dignifiedquire dignifiedquire added status/in-progress In progress status/deferred Conscious decision to pause or backlog and removed status/deferred Conscious decision to pause or backlog milestone 4 labels Aug 2, 2016
dignifiedquire added a commit that referenced this issue Aug 3, 2016
dignifiedquire added a commit that referenced this issue Aug 3, 2016
dignifiedquire added a commit that referenced this issue Aug 3, 2016
dignifiedquire added a commit that referenced this issue Aug 4, 2016
@daviddias daviddias removed the status/in-progress In progress label Aug 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants