Archived
c copies the absolute directory of the selected submodule via OSC 52. Keys are grouped into navigation (footer left), global (footer right) and submodule (detail pane palette, footer if the pane can't show it). Adds a key reference table to the UX guide. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
464 B
Go
22 lines
464 B
Go
package tui
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/aymanbagabas/go-osc52/v2"
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
)
|
|
|
|
// copyToClipboard sets the system clipboard with the OSC 52 escape sequence,
|
|
// which works over SSH and in terminals that allow it; others ignore it.
|
|
func copyToClipboard(text string) tea.Cmd {
|
|
return func() tea.Msg {
|
|
seq := osc52.New(text)
|
|
if os.Getenv("TMUX") != "" {
|
|
seq = seq.Tmux()
|
|
}
|
|
_, _ = seq.WriteTo(os.Stderr)
|
|
return nil
|
|
}
|
|
}
|