CITGuru / PyInquirer

A Python module for common interactive command line user interfaces
MIT License
1.92k stars 236 forks source link

The "expand" type is described as using `help` by default, but instead the first choice is used by default #50

Open tjb1982 opened 5 years ago

tjb1982 commented 5 years ago

I suppose this could be just a change to the readme to correctly describe the default behavior, but there is currently no way that I can find to make help the default for the expand type.

CITGuru commented 5 years ago

@tjb1982 I dont understand what you mean

tjb1982 commented 5 years ago

I mean when you provide a list of choices and no default, like

{
  "type": "expand",
  #"default": "<=commented-out",
  "choices": [...],
}

The default (i.e., hitting the return key) should expand the help, but instead the first provided choice is the default.

CITGuru commented 5 years ago

Yes, you mean it should show up the help rather than the default if the default is not given.

tjb1982 commented 5 years ago

I mean, that's what I thought the docs said it would do. I also think it should be possible to manually assign the help as the default, but that doesn't seem to work either.

CITGuru commented 5 years ago

Hmmnnn, lemme check that out.

tjb1982 commented 5 years ago

If you accept PRs on this I can probably help out, also. Let me know.

CITGuru commented 5 years ago

Sure I accept PRS. I am actually looking for contributors now

tjb1982 commented 5 years ago

Sorry for the delayed reply. Okay, great. I'm actively using this library on a project, so as I go, I'll make PRs. I'm side tracked right now, though, with a project at work, so it might be a couple of weeks.

CITGuru commented 5 years ago

Sure, no problem. Thanks