Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subcommand help is inconsistent #375

Open
sferik opened this issue Dec 3, 2013 · 5 comments
Open

Subcommand help is inconsistent #375

sferik opened this issue Dec 3, 2013 · 5 comments

Comments

@sferik
Copy link
Contributor

sferik commented Dec 3, 2013

command help subcommand

produces different output than

command subcommand help

The output of these two help commands should be unified and merged.

@developingchris
Copy link
Contributor

I think my pull request #387 solves this.

If it needs rebased again or anything to get included, let me know.

@brettswift
Copy link

I'm adding this here instead of a new issue as it's somewhat related. developingchris's fix, improves my output as you'll see below, however I still get unexpected results. I also still have to use hack #261 but still my output isn't correct.

showterm vids to display behaviour I'm seeing:

using developingchris PR #387
http://showterm.io/cc03f941acadf7f083399

using developingchris PR #387, with hack #261
http://showterm.io/705af2aa41f7dd4da1d2b

What I see with both the PR #387 and hack on the post #261
image

What I should see:

$ bird cloud help list
Usage:
  bird cloud list help [COMMAND] # doesn't need to be there, there are no sub commands yet for list. 
Options:
  vapp, [--vapp= vApp name]

Description: 
  list vApps - NOT IMPLEMENTED

Describe subcommands or one specific subcommand

I'm new to Ruby and therefore Thor. My source is here: https://github.com/brettswift/bird . Criticism welcome - or maybe I've structure my files in a way that is causing this issue? I see a few more issues like this on this project, so I'm thinking it's not just me.. (oh, and I know my code isn't tested right now.. so don't slap me for that.. it will be! )

[edit]
I will try to find time to get to this - but in case someone more familiar with the code gets to it first.. i'm just documenting the issue that everyone using subcommands is likely seeing.

  • I also compared behaviour to git help remote add and git remote help add and it seems like the behaviour there isn't what I'm asking for on this post either. Maybe the solution is to have a long_desc 'cloud' text file in a docs folder, that has a listing for all commands in 'cloud.rb'. It'd work and keep the solution clean. However, I still think this feature would be nice.

@developingchris
Copy link
Contributor

I'll try and review this and get some more tests around it in the next day. I'm not sure watching the video what is causing it.

@brettswift
Copy link

Thanks. I can't seem to get any of the subcommand options to display no matter what I do. Hopefully this isn't just my implementation.
I've actually stopped using the #261 fix in cloud.rb because it results in cloud list list help [COMMAND].

@discount-elf
Copy link

I am experiencing the same behavior as brettswift, with the latest thor release :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants