aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Bug: Inconsistent examples of using the shell commands

Open miketheman opened this issue 11 months ago • 3 comments

Description:

When running any --help command, the examples should reflect what a user would actually copy/paste, and there are some that do not display a space between the $ representing a shell prompt and the actual command.

Basically, any time there's a command, either remove the preceding $ or add a space.

Steps to reproduce:

sam --help

or

sam sync --help

(This is not a comprehensive audit of all command examples)

Observed result:

...shellsession
Examples:

    Get Started:        $sam init
...
  By default, `$sam sync` runs a full AWS Cloudformation stack update.
...

Examples:

    $sam sync --watch --stack-name {stack}

    $sam sync --code --watch --stack-name {stack}

    $sam sync --code --stack-name {stack} --resource-id {ChildStack}/{ResourceId}
...



### Expected result:
<!-- Describe what you expected. -->

```shellsession
Examples:

    Get Started:        $ sam init
Examples:

    $ sam sync --watch --stack-name {stack}

    $ sam sync --code --watch --stack-name {stack}

    $ sam sync --code --stack-name {stack} --resource-id {ChildStack}/{ResourceId}

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

{
  "version": "1.131.0",
  "system": {
    "python": "3.13.0",
    "os": "macOS-15.1.1-x86_64-i386-64bit-Mach-O"
  },
  "additional_dependencies": {
    "docker_engine": "Not available",
    "aws_cdk": "Not available",
    "terraform": "1.5.7"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}```

miketheman avatar Dec 08 '24 01:12 miketheman