Skip to content

Print full PR URLs when OSC 8 hyperlinks are unsupported - #479

Open
skarim wants to merge 1 commit into
mainfrom
skarim/print-pr-urls
Open

Print full PR URLs when OSC 8 hyperlinks are unsupported#479
skarim wants to merge 1 commit into
mainfrom
skarim/print-pr-urls

Conversation

@skarim

@skarim skarim commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Prints out full PR URLs on terminals that don't support OSC 8 hyperlinks.

Supported terminals keep the existing hyperlink behavior with printing PR references. When detected terminal doesn't support, fall back to printing the full URL (#N (full URL)). This covers gh stack view --short and existing non-TUI status output. TUI and JSON output behavior remains unchanged.

Detection is conservative for tmux, screen, Apple Terminal, Konsole, non-TTY output, and unknown terminals.
A GH_STACK_HYPERLINKS env var is available to override the detection — 1 forces hyperlinks and 0 forces full URLs.

Copilot AI balanced review requested due to automatic review settings August 26, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds plain PR URL fallbacks when OSC 8 hyperlinks are unsupported.

Changes:

  • Detects terminal hyperlink support with an environment override.
  • Updates PR formatting and tests.
  • Documents hyperlink behavior.
Show a summary per file
File Description
README.md Documents fallback behavior.
internal/config/config.go Adds detection and URL formatting.
internal/config/hyperlink_test.go Tests detection and formatting.
cmd/view_test.go Tests short-view fallback.
docs/src/content/docs/reference/cli.md Documents CLI behavior and environment variable.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread internal/config/hyperlink_test.go
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.

gh stack: print full URL to stdout when terminal doesn't support OSC8 hyperlinks

2 participants