From 73ccd13e63a859e21a07cab0a76b0da46895dab5 Mon Sep 17 00:00:00 2001 From: Toby Padilla Date: Fri, 20 Aug 2021 17:32:11 -0500 Subject: [PATCH] Show "git clone" command in header, unless we're on config --- tui/bubbles/repo/bubble.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tui/bubbles/repo/bubble.go b/tui/bubbles/repo/bubble.go index 609fd2dace458b3b2584030d9c57ae4b985f10eb..fb7d6c0415ec3c6879e9d694b78328ac21f68923 100644 --- a/tui/bubbles/repo/bubble.go +++ b/tui/bubbles/repo/bubble.go @@ -102,12 +102,15 @@ func (b Bubble) headerView() string { ts = ts.Copy().BorderForeground(b.styles.ActiveBorderColor) ns = ns.Copy().BorderForeground(b.styles.ActiveBorderColor) } + var gc string n := b.name if n == "config" { n = "Home" + } else { + gc = fmt.Sprintf("git clone %s", b.sshAddress()) } title := ts.Render(n) - note := ns.Width(b.width - b.widthMargin - lipgloss.Width(title)).Render(b.sshAddress()) + note := ns.Width(b.width - b.widthMargin - lipgloss.Width(title)).Render(gc) return lipgloss.JoinHorizontal(lipgloss.Top, title, note) }