Add usage examples to gh gist edit command#12710
Merged
BagToad merged 1 commit intotrunkcli/cli:trunkfrom Feb 17, 2026
kw/document-gist-edit-file-replacementcli/cli:kw/document-gist-edit-file-replacementCopy head branch name to clipboard
Merged
Add usage examples to gh gist edit command#12710BagToad merged 1 commit intotrunkcli/cli:trunkfrom kw/document-gist-edit-file-replacementcli/cli:kw/document-gist-edit-file-replacementCopy head branch name to clipboard
gh gist edit command#12710BagToad merged 1 commit intotrunkcli/cli:trunkfrom
kw/document-gist-edit-file-replacementcli/cli:kw/document-gist-edit-file-replacementCopy head branch name to clipboard
Conversation
Add a cobra Example string to the gist edit command showing common operations: interactive selection, editing in default editor, editing a specific file, replacing file content, adding/removing files, and changing the description. Closes #8943 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive usage examples to the gh gist edit command to improve discoverability of non-interactive editing capabilities. The change addresses user feedback (issue #8943) where users found it difficult to discover how to edit gists non-interactively without searching through PRs.
Changes:
- Added
Examplefield to thegh gist editcommand showing seven common usage patterns including interactive selection, editing in default editor, editing specific files, replacing file content from local files, adding/removing files, and changing descriptions - Added import for
github.com/MakeNowJust/heredocpackage to format the examples
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a cobra
Examplestring to thegist editcommand showing common operations: interactive selection, editing in default editor, editing a specific file, replacing file content from a local file, adding/removing files, and changing the description.The motivation comes from user feedback that it was difficult to discover how to edit a gist non-interactively without searching through PRs.
Note
I have enabled auto-merge ℹ️
Closes #8943