awslabs / aws-shell

An integrated shell for working with the AWS CLI.
Apache License 2.0
7.22k stars 779 forks source link

Can't see AWS S3 CP -grants documentation #163

Open simplesteph opened 7 years ago

simplesteph commented 7 years ago

try aws s3 cp --grants

The documentation will be image

Whereas in the official online docs, you can see that it's so much more for --grants: http://docs.aws.amazon.com/cli/latest/reference/s3/cp.html#options

donnemartin commented 7 years ago

Hi, I also see this bug, thanks for reporting.

Perhaps the doc generation might be failing on extracting the code block, here's online snippet:

--grants (string)

Grant specific permissions to individual users or groups. You can supply a list of grants of the form

--grants Permission=Grantee_Type=Grantee_ID [Permission=Grantee_Type=Grantee_ID ...]
joguSD commented 7 years ago

This is a bug in how the argument documentation is parsed. The code responsible is here docs.py. The idea is that the documentation will look like:

--argument1 
some description

--argument2
some description

So it will take all the text up until the next argument. In this case there is an example containing -- in the documentation and thus it stops taking documentation once it reaches that point. A simple fix might be to take until the next occurrence of \n--. However, there's another bug with this approach. For the last argument there wont be another occurrence of -- or \n-- and it will take all of the remaining documentation. That being said, I'm not sure what the best approach to fix this is. @jamesls Any ideas?