Last active
October 27, 2025 15:51
-
-
Save lmmx/4465156432b1f424887e08dc4abf09b7 to your computer and use it in GitHub Desktop.
Use `gh issue` or `gh pr` to edit a PR/issue non-interactively (jump directly to editor, no TUI)
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
| function ghieb() { | |
| [[ $# -eq 0 ]] && echo "Usage: ghieb <issue ID>" && return 1 | |
| local tmpfile=$(mktemp) | |
| trap "rm -f $tmpfile" RETURN EXIT | |
| gh issue view $1 --json body -q .body > "$tmpfile" || return 1 | |
| $EDITOR "$tmpfile" | |
| gh issue edit $1 --body-file "$tmpfile" | |
| } |
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
| ghpreb() { | |
| local tmpfile=$(mktemp) | |
| trap "rm -f $tmpfile" RETURN EXIT | |
| gh pr view --json body -q .body > "$tmpfile" || return 1 | |
| $EDITOR "$tmpfile" | |
| gh pr edit --body-file "$tmpfile" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment