Archived
Add c to copy the selected path, split key bar into groups
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>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user