aws-shell icon indicating copy to clipboard operation
aws-shell copied to clipboard

Can't see AWS S3 CP -grants documentation

Open simplesteph opened this issue 7 years ago • 2 comments

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

simplesteph avatar Dec 14 '16 03:12 simplesteph

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 ...]

donnemartin avatar Jan 08 '17 13:01 donnemartin

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?

joguSD avatar Jul 31 '17 23:07 joguSD