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

Empty command in git.py does not show help message #498

Open
gtarabat opened this issue Dec 30, 2021 · 2 comments
Open

Empty command in git.py does not show help message #498

gtarabat opened this issue Dec 30, 2021 · 2 comments

Comments

@gtarabat
Copy link

According to the following line in examples/git/git.py

elif args['<command>'] in ['help', None]:

running ./git.py should give the same message as running ./git.py help. But it gives only the usage message instead.

Also, the line

See 'git help <command>' for more information on a specific command.

in the description does not work as expected.

@beierman
Copy link

I've been puzzled by this as well.

$ ./git.py help      2>&1 | wc -l
      36
$ ./git.py           2>&1 | wc -l
       5
$ ./git.py --help    2>&1 | wc -l
      21

The first two (['help', None]) should map to the last one (--help), but all three give widely different outputs.

@gtarabat The last line (See 'git help ... for more information on a specific command.) is printed when you set help=True and run ./git.py --help:

args = docopt(__doc__,
    version='git version 1.7.4.4',
    help=True,
    options_first=True)

@gtarabat
Copy link
Author

@beierman help=True is the default value. The list line is printed as expected when I run ./git.py --help.

What I mean with the last line is that running git help <command> does not give the help message for the <command>.

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

2 participants