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

improvements to help #34

Closed
2 tasks
gregcaporaso opened this issue Jul 17, 2016 · 6 comments
Closed
2 tasks

improvements to help #34

gregcaporaso opened this issue Jul 17, 2016 · 6 comments

Comments

@gregcaporaso
Copy link
Member

gregcaporaso commented Jul 17, 2016

  • -h is shortcut for --help
  • calling subcommands (e.g., qiime tools extract or qiime diversity alpha) invokes help
@ebolyen
Copy link
Member

ebolyen commented Jul 17, 2016

ls -h, du -h, df -h, and others all use it to mean --human-readable.
touch is a weird one who uses it to mean --no-dereference.

Whatever we do, so long as we do better than man:

$ man
What manual page do you want?

And similarly:

$  man 1
No manual entry for 1
(Alternatively, what manual page do you want from section 1?)

Can you imagine:

$ qiime
What plugin do you want?
$ qiime foo
No action for foo
(Alternatively, what action do you want from foo?)

<sarcasm> There is clearly a lot of great UX we can borrow from unix utilities. </sarcasm>

@gregcaporaso gregcaporaso changed the title -h is shortcut for --help improvements to help Jul 17, 2016
@kestrelgorlick
Copy link
Contributor

From what I've seen, there doesn't appear to be a good way to do this. In the click.Command documentation, there isn't a nice option for it, like no_args_is_help. Also, I have found two different issues from people who've had this problem, one here and one here. In the second one, the person who submitted the issue was pointed to this solution which adds a hint when passing command sub-command without --help, but still throws the error. This has been merged, but there must've not been a release since then, because it's not implemented yet. Additionally, the person who submitted the issue made a fix, but it hasn't been merged, as it has conflicts.

Thoughts?

@ebolyen
Copy link
Member

ebolyen commented Jul 19, 2016

Looking into those issues (thanks @Kleptobismol!), I think I agree with what they are doing currently, providing a hint to use --help. It was merged a week or so after their last release, and judging by their frequency of releasing I would expect this will be available soonish.

I am also starting to really wonder if aliasing -h makes sense. Outside of QIIME, I've never seen it used to mean --help and --help is one of the few actually "standard" arguments in UNIX, it seems like we might need to do a lot of work for "nonstandard" behavior.

@gregcaporaso
Copy link
Member Author

Given all of this, we're going to skip these.

@jakereps
Copy link
Member

It looks like this may be possible, do we want to try this? (pair-opened w/ @ebolyen)

pallets/click/issues/700

@jakereps jakereps reopened this Dec 12, 2016
@jairideout
Copy link
Member

Pair-closed w/ @gregcaporaso

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