Skip to content

Conversation

@pbrisbin
Copy link
Member

@pbrisbin pbrisbin commented Oct 17, 2025

optparse-applicative offers a header or a footer info modifier, but
they both put the text in the wrong place: either above or below
everything. To get the text to appear after the one-line description,
but before the options, we need to manually append it.

Here is the updated help,

% stackctl deploy --help
Usage: stackctl deploy [-p|--parameter KEY=[VALUE]] [-t|--tag KEY=[VALUE]]
                       [--save-change-sets DIRECTORY] [--no-confirm]
                       [--no-remove] [--clean]

  Deploy specifications

  By default, this will operate on the entire stack collection. To operate on a
  specific stack or set of stacks, use the --filter argument to filter the
  collection by file path.

Available options:
  -p,--parameter KEY=[VALUE]
                           Override the given Parameter for this operation
  -t,--tag KEY=[VALUE]     Override the given Tag for this operation
  --save-change-sets DIRECTORY
                           Save executed changesets to DIRECTORY
  --no-confirm             Don't confirm changes before executing
  --no-remove              Don't delete removed Stacks
  --clean                  Remove all changesets from Stack after deploy
  -h,--help                Show this help text

Global options:
  -d,--directory PATH      Use the stack collection located at PATH (default:
                           current working directory)
  --filter PATTERN[,PATTERN]
                           Filter specifications to match PATTERN(s)
  --color auto|always|never
                           When to colorize output
  -v,--verbose             Increase verbosity (can be passed multiple times)
  --auto-sso WHEN          Automatically run aws-sso-login if necessary?

NOTE: fullDescr was removed because it is the default.
helpShowGlobals was added because it was an oversight to not have it
before.

optparse-applicative offers a `header` or a `footer` info modifier, but
they both put the text in the wrong place: either above or below
everything. To get the text to appear after the one-line description,
but before the options, we need to manually append it.

Here is the updated help,

```console
% stackctl deploy --help
Usage: stackctl deploy [-p|--parameter KEY=[VALUE]] [-t|--tag KEY=[VALUE]]
                       [--save-change-sets DIRECTORY] [--no-confirm]
                       [--no-remove] [--clean]

  Deploy specifications

  By default, this will operate on the entire stack collection. To operate on a
  specific stack or set of stacks, use the --filter argument to filter the
  collection by file path.

Available options:
  -p,--parameter KEY=[VALUE]
                           Override the given Parameter for this operation
  -t,--tag KEY=[VALUE]     Override the given Tag for this operation
  --save-change-sets DIRECTORY
                           Save executed changesets to DIRECTORY
  --no-confirm             Don't confirm changes before executing
  --no-remove              Don't delete removed Stacks
  --clean                  Remove all changesets from Stack after deploy
  -h,--help                Show this help text

Global options:
  -d,--directory PATH      Use the stack collection located at PATH (default:
                           current working directory)
  --filter PATTERN[,PATTERN]
                           Filter specifications to match PATTERN(s)
  --color auto|always|never
                           When to colorize output
  -v,--verbose             Increase verbosity (can be passed multiple times)
  --auto-sso WHEN          Automatically run aws-sso-login if necessary?
```

NOTE: `fullDescr` was removed because it is the default.
`helpShowGlobals` was added because it was an oversight to not have it
before.
@pbrisbin pbrisbin changed the title pb/help fix(docs): mention --filter in all subcommand help Oct 17, 2025
@pbrisbin pbrisbin requested a review from chris-martin October 17, 2025 15:39
@pbrisbin pbrisbin marked this pull request as ready for review October 17, 2025 15:39
@pbrisbin pbrisbin requested a review from a team as a code owner October 17, 2025 15:39
@pbrisbin pbrisbin requested review from danroyo and removed request for a team and danroyo October 17, 2025 15:39
@pbrisbin pbrisbin linked an issue Oct 17, 2025 that may be closed by this pull request
@pbrisbin pbrisbin merged commit 8537f46 into main Oct 17, 2025
5 checks passed
@pbrisbin pbrisbin deleted the pb/help branch October 17, 2025 18:09
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

Successfully merging this pull request may close these issues.

How to filter stacks is unclear

3 participants