Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Pika-Gopher
Copy link

Fixes #10623
This patch adds a short, discoverable section to command-line-syntax.md that explains the CLI's "interactive prompting" behaviour: many commands are intentionaly "all-or-nothing" — if you supply any input via flags, the command will not prompt for missing fields. The new section explains the rationale, gives a brief example (when to use --title/--body vs gh issue create --fill), offers simple troubleshooting steps for users who expect partial prompting, and points contributors to the repository's CONTRIBUTING guidance for filing bugs or suggesting UX changes.

@Pika-Gopher Pika-Gopher requested a review from a team as a code owner October 21, 2025 10:13
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Oct 21, 2025
@github-actions
Copy link

Thank you for your pull request! 🎉

This PR appears to fix the following issues that are not labeled with help wanted Contributions welcome :

As outlined in our Contributing Guidelines, we expect that PRs are only created for issues that have been labeled help wanted.

While we appreciate your initiative, please note that:

  • PRs for non-help wanted issues may not be reviewed immediately as they might not align with our current priorities
  • The issue might already be assigned to a team member or planned for a specific release
  • We may need to close this PR. For example, if it conflicts with ongoing work or architectural decisions

What happens next:

  • Our team will review this PR and the associated issues
  • We may add the help wanted label to the issues, if appropriate, and review this pull request
  • In some cases, we may need to close the PR. For example, if it doesn't fit our current roadmap

Thank you for your understanding and contribution to the project! 🙏

This comment was automatically generated by cliAutomation.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR documents GitHub CLI's "all-or-nothing" interactive prompting behavior, addressing issue #10623. The documentation clarifies that commands either run in fully interactive mode (no input flags) or fully non-interactive mode (all input via flags), preventing confusion when users expect partial prompting.

Key Changes:

  • Added a new "Interactive prompting policy" section to command-line-syntax.md explaining the CLI's prompting behavior
  • Provided examples demonstrating interactive vs non-interactive command usage
  • Included troubleshooting guidance for users who don't receive expected prompts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Interactive prompting policy
Design note: many `gh` commands follow an "all-or-nothing" prompting policy: if any flags or arguments that supply input are provided on the command line, the command will not prompt interactively for other fields. Put another way, commands behave either in a fully interactive mode (no input flags) or in a fully non-interactive mode (all required input supplied via flags/arguments).

Why this exists
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should follow standard markdown formatting with a leading '#' symbol. Change to '### Why this exists' to maintain proper heading hierarchy.

Suggested change
Why this exists
### Why this exists

Copilot uses AI. Check for mistakes.

- Predictability: automation and scripts can call `gh` with flags and be confident it will not hang waiting for input.
- Simplicity: a single, easy-to-understand model reduces confusion for users — either supply everything up front or be prompted for everything.

Examples
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should follow standard markdown formatting with a leading '#' symbol. Change to '### Examples' to maintain proper heading hierarchy.

Suggested change
Examples
### Examples

Copilot uses AI. Check for mistakes.


Supplying any input flags like `--title` or `--body` causes the command to avoid prompting for other fields.

If you expect a prompt but are not prompted
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should follow standard markdown formatting with a leading '#' symbol. Change to '### If you expect a prompt but are not prompted' to maintain proper heading hierarchy.

Suggested change
If you expect a prompt but are not prompted
### If you expect a prompt but are not prompted

Copilot uses AI. Check for mistakes.

- Ensure no input flags or arguments are present. Even a single flag that supplies a value may disable interactive prompts for the remainder of the command.
- Consult the command's help (for example, `gh help issue create`) to see which flags are considered input flags.

Filing issues
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should follow standard markdown formatting with a leading '#' symbol. Change to '### Filing issues' to maintain proper heading hierarchy.

Suggested change
Filing issues
### Filing issues

Copilot uses AI. Check for mistakes.


See the project's contribution guide for issue templates and guidance: `../.github/CONTRIBUTING.md`.

Rationale for placement
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should follow standard markdown formatting with a leading '#' symbol. Change to '### Rationale for placement' to maintain proper heading hierarchy.

Suggested change
Rationale for placement
### Rationale for placement

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that many commands are "all or nothing" when prompting

2 participants