Skip to content

Commit

Permalink
Merge pull request #7118 from hssyoo/add-example-note-v1
Browse files Browse the repository at this point in the history
Add Examples note
  • Loading branch information
stealthycoin authored Jul 21, 2022
2 parents b2008bc + 85b95e7 commit 25516be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions awscli/customizations/addexamples.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ def add_examples(help_command, **kwargs):
LOG.debug("Looking for example file at: %s", doc_path)
if os.path.isfile(doc_path):
help_command.doc.style.h2('Examples')
help_command.doc.style.start_note()
msg = ("<p>To use the following examples, you must have the AWS "
"CLI installed and configured. See the "
"<a href='https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-quickstart.html'>"
"Getting started guide</a> in the <i>AWS CLI User Guide</i> "
"for more information.</p>"
"<p>Unless otherwise stated, all examples have unix-like "
"quotation rules. These examples will need to be adapted "
"to your terminal's quoting rules. See "
"<a href='https://docs.aws.amazon.com/cli/v1/userguide/cli-usage-parameters-quoting-strings.html'>"
"Using quotation marks with strings</a> "
"in the <i>AWS CLI User Guide</i>.</p>")
help_command.doc.include_doc_string(msg)
help_command.doc.style.end_note()
fp = open(doc_path)
for line in fp.readlines():
help_command.doc.write(line)

0 comments on commit 25516be

Please sign in to comment.