Skip to content

Commit f66e95c

Browse files
committed
add sticky header to view tui
1 parent 2879cfe commit f66e95c

6 files changed

Lines changed: 452 additions & 30 deletions

File tree

cmd/root.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ func RootCmd() *cobra.Command {
1515
Use: "stack <command>",
1616
Short: "Manage stacked branches and pull requests",
1717
Long: "Create, navigate, and manage stacks of branches and pull requests.",
18+
Version: Version,
1819
SilenceUsage: true,
1920
SilenceErrors: true,
2021
}

cmd/version.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package cmd
2+
3+
// Version is the current version of gh-stack.
4+
// It can be overridden at build time via:
5+
//
6+
// go build -ldflags="-X github.com/github/gh-stack/cmd.Version=1.2.3"
7+
var Version = "0.0.1"

cmd/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func viewFullTUI(cfg *config.Config, s *stack.Stack, currentBranch string) error
176176
reversed[len(nodes)-1-i] = n
177177
}
178178

179-
model := stackview.New(reversed, s.Trunk)
179+
model := stackview.New(reversed, s.Trunk, Version)
180180

181181
p := tea.NewProgram(
182182
model,

0 commit comments

Comments
 (0)