From b9708c9f8850352d18ef4d10c285698be882f838 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Wed, 19 Sep 2018 20:36:40 +1000 Subject: [PATCH 1/9] fix issues with commit message panel losing focus --- pkg/gui/commit_message_panel.go | 4 ++++ pkg/gui/view_helpers.go | 9 ++++++++- pkg/utils/utils.go | 10 ++++++++++ pkg/utils/utils_test.go | 35 +++++++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go index e23c47da0..74e02be90 100644 --- a/pkg/gui/commit_message_panel.go +++ b/pkg/gui/commit_message_panel.go @@ -37,6 +37,10 @@ func (gui *Gui) handleCommitClose(g *gocui.Gui, v *gocui.View) error { } func (gui *Gui) handleCommitFocused(g *gocui.Gui, v *gocui.View) error { + if _, err := g.SetViewOnTop("commitMessage"); err != nil { + return err + } + message := gui.Tr.TemplateLocalize( "CloseConfirm", Teml{ diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 5178bd4d9..96a77f3d6 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -133,8 +133,15 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error { }, ) gui.Log.Info(message) - gui.State.PreviousView = oldView.Name() + + // second class panels should never have focus restored to them because + // once they lose focus they are effectively 'destroyed' + secondClassPanels := []string{"confirmation", "menu"} + if !utils.IncludesString(secondClassPanels, oldView.Name()) { + gui.State.PreviousView = oldView.Name() + } } + newView.Highlight = true message := gui.Tr.TemplateLocalize( "newFocusedViewIs", diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index aef653c50..8e481b3a4 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -204,3 +204,13 @@ func getDisplayStringArrays(displayables []Displayable) [][]string { } return stringArrays } + +// IncludesString if the list contains the string +func IncludesString(list []string, a string) bool { + for _, b := range list { + if b == a { + return true + } + } + return false +} diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index 918031512..21e1d5031 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -376,3 +376,38 @@ func TestMin(t *testing.T) { assert.EqualValues(t, s.expected, Min(s.a, s.b)) } } + +func TestIncludesString(t *testing.T) { + type scenario struct { + list []string + element string + expected bool + } + + scenarios := []scenario{ + { + []string{"a", "b"}, + "a", + true, + }, + { + []string{"a", "b"}, + "c", + false, + }, + { + []string{"a", "b"}, + "", + false, + }, + { + []string{""}, + "", + true, + }, + } + + for _, s := range scenarios { + assert.EqualValues(t, s.expected, IncludesString(s.list, s.element)) + } +} From 9481920101c7f8e29875e6db2642fe2b317564f9 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Tue, 18 Sep 2018 20:47:40 +0200 Subject: [PATCH 2/9] commands/git : add test to GetLog --- pkg/commands/git_test.go | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go index 790a34690..ba2696e5d 100644 --- a/pkg/commands/git_test.go +++ b/pkg/commands/git_test.go @@ -1553,6 +1553,48 @@ func TestGitCommandGetCommits(t *testing.T) { } } +func TestGitCommandGetLog(t *testing.T) { + type scenario struct { + testName string + command func(string, ...string) *exec.Cmd + test func(string) + } + + scenarios := []scenario{ + { + "Retrieves logs", + func(cmd string, args ...string) *exec.Cmd { + assert.EqualValues(t, "git", cmd) + assert.EqualValues(t, []string{"log", "--oneline", "-30"}, args) + + return exec.Command("echo", "6f0b32f commands/git : add GetCommits tests refactor\n9d9d775 circle : remove new line") + }, + func(output string) { + assert.EqualValues(t, "6f0b32f commands/git : add GetCommits tests refactor\n9d9d775 circle : remove new line\n", output) + }, + }, + { + "An error occurred when retrieving logs", + func(cmd string, args ...string) *exec.Cmd { + assert.EqualValues(t, "git", cmd) + assert.EqualValues(t, []string{"log", "--oneline", "-30"}, args) + return exec.Command("test") + }, + func(output string) { + assert.Empty(t, output) + }, + }, + } + + for _, s := range scenarios { + t.Run(s.testName, func(t *testing.T) { + gitCmd := newDummyGitCommand() + gitCmd.OSCommand.command = s.command + s.test(gitCmd.GetLog()) + }) + } +} + func TestGitCommandDiff(t *testing.T) { gitCommand := newDummyGitCommand() assert.NoError(t, test.GenerateRepo("lots_of_diffs.sh")) From bdeb78c9a04963847ffd90c2277b3a274e3ba309 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Tue, 18 Sep 2018 20:53:32 +0200 Subject: [PATCH 3/9] commands/git : returns an error instead of panicing --- pkg/commands/git.go | 8 ++------ pkg/commands/git_test.go | 13 +++++++++++++ pkg/gui/commits_panel.go | 5 ++++- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pkg/commands/git.go b/pkg/commands/git.go index c37ca9b47..24dcc6894 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -499,12 +499,8 @@ func (c *GitCommand) Ignore(filename string) error { } // Show shows the diff of a commit -func (c *GitCommand) Show(sha string) string { - result, err := c.OSCommand.RunCommandWithOutput("git show --color " + sha) - if err != nil { - panic(err) - } - return result +func (c *GitCommand) Show(sha string) (string, error) { + return c.OSCommand.RunCommandWithOutput(fmt.Sprintf("git show --color %s", sha)) } // Diff returns the diff of a file diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go index ba2696e5d..eb17103fc 100644 --- a/pkg/commands/git_test.go +++ b/pkg/commands/git_test.go @@ -1421,6 +1421,19 @@ func TestGitCommandRemoveFile(t *testing.T) { } } +func TestGitCommandShow(t *testing.T) { + gitCmd := newDummyGitCommand() + gitCmd.OSCommand.command = func(cmd string, args ...string) *exec.Cmd { + assert.EqualValues(t, "git", cmd) + assert.EqualValues(t, []string{"show", "--color", "456abcde"}, args) + + return exec.Command("echo") + } + + _, err := gitCmd.Show("456abcde") + assert.NoError(t, err) +} + func TestGitCommandCheckout(t *testing.T) { type scenario struct { testName string diff --git a/pkg/gui/commits_panel.go b/pkg/gui/commits_panel.go index 7c09559ff..91bb334ff 100644 --- a/pkg/gui/commits_panel.go +++ b/pkg/gui/commits_panel.go @@ -68,7 +68,10 @@ func (gui *Gui) handleCommitSelect(g *gocui.Gui, v *gocui.View) error { } return gui.renderString(g, "main", gui.Tr.SLocalize("NoCommitsThisBranch")) } - commitText := gui.GitCommand.Show(commit.Sha) + commitText, err := gui.GitCommand.Show(commit.Sha) + if err != nil { + return err + } return gui.renderString(g, "main", commitText) } From 360b7c1def1f5945f30d89e393bdd4233f0c3179 Mon Sep 17 00:00:00 2001 From: Anthony HAMON Date: Tue, 18 Sep 2018 21:09:51 +0200 Subject: [PATCH 4/9] commands/git : refactor test to Diff, refactor function --- pkg/commands/git.go | 4 +- pkg/commands/git_test.go | 130 +++++++++++++----------------------- test/repos/lots_of_diffs.sh | 35 ---------- 3 files changed, 50 insertions(+), 119 deletions(-) delete mode 100755 test/repos/lots_of_diffs.sh diff --git a/pkg/commands/git.go b/pkg/commands/git.go index 24dcc6894..d9effbef5 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -506,15 +506,15 @@ func (c *GitCommand) Show(sha string) (string, error) { // Diff returns the diff of a file func (c *GitCommand) Diff(file *File) string { cachedArg := "" + trackedArg := "--" fileName := c.OSCommand.Quote(file.Name) if file.HasStagedChanges && !file.HasUnstagedChanges { cachedArg = "--cached" } - trackedArg := "--" if !file.Tracked && !file.HasStagedChanges { trackedArg = "--no-index /dev/null" } - command := fmt.Sprintf("%s %s %s %s", "git diff --color ", cachedArg, trackedArg, fileName) + command := fmt.Sprintf("git diff --color %s %s %s", cachedArg, trackedArg, fileName) // for now we assume an error means the file was deleted s, _ := c.OSCommand.RunCommandWithOutput(command) diff --git a/pkg/commands/git_test.go b/pkg/commands/git_test.go index eb17103fc..e5fd539b9 100644 --- a/pkg/commands/git_test.go +++ b/pkg/commands/git_test.go @@ -9,7 +9,6 @@ import ( "time" "github.com/jesseduffield/lazygit/pkg/i18n" - "github.com/jesseduffield/lazygit/pkg/test" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" gogit "gopkg.in/src-d/go-git.v4" @@ -1609,96 +1608,63 @@ func TestGitCommandGetLog(t *testing.T) { } func TestGitCommandDiff(t *testing.T) { - gitCommand := newDummyGitCommand() - assert.NoError(t, test.GenerateRepo("lots_of_diffs.sh")) + type scenario struct { + testName string + command func(string, ...string) *exec.Cmd + file *File + } - files := []*File{ + scenarios := []scenario{ { - Name: "deleted_staged", - HasStagedChanges: false, - HasUnstagedChanges: true, - Tracked: true, - Deleted: true, - HasMergeConflicts: false, - DisplayString: " D deleted_staged", + "Default case", + func(cmd string, args ...string) *exec.Cmd { + assert.EqualValues(t, "git", cmd) + assert.EqualValues(t, []string{"diff", "--color", "--", "test.txt"}, args) + + return exec.Command("echo") + }, + &File{ + Name: "test.txt", + HasStagedChanges: false, + Tracked: true, + }, }, { - Name: "file with space staged", - HasStagedChanges: true, - HasUnstagedChanges: false, - Tracked: false, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "A \"file with space staged\"", + "All changes staged", + func(cmd string, args ...string) *exec.Cmd { + assert.EqualValues(t, "git", cmd) + assert.EqualValues(t, []string{"diff", "--color", "--cached", "--", "test.txt"}, args) + + return exec.Command("echo") + }, + &File{ + Name: "test.txt", + HasStagedChanges: true, + HasUnstagedChanges: false, + Tracked: true, + }, }, { - Name: "file with space unstaged", - HasStagedChanges: false, - HasUnstagedChanges: true, - Tracked: false, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "?? file with space unstaged", - }, - { - Name: "modified_unstaged", - HasStagedChanges: true, - HasUnstagedChanges: false, - Tracked: true, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "M modified_unstaged", - }, - { - Name: "modified_staged", - HasStagedChanges: false, - HasUnstagedChanges: true, - Tracked: true, - Deleted: false, - HasMergeConflicts: false, - DisplayString: " M modified_staged", - }, - { - Name: "renamed_before -> renamed_after", - HasStagedChanges: true, - HasUnstagedChanges: false, - Tracked: true, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "R renamed_before -> renamed_after", - }, - { - Name: "untracked_unstaged", - HasStagedChanges: false, - HasUnstagedChanges: true, - Tracked: false, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "?? untracked_unstaged", - }, - { - Name: "untracked_staged", - HasStagedChanges: true, - HasUnstagedChanges: false, - Tracked: false, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "A untracked_staged", - }, - { - Name: "master", - HasStagedChanges: false, - HasUnstagedChanges: true, - Tracked: false, - Deleted: false, - HasMergeConflicts: false, - DisplayString: "?? master", + "File not tracked and file has no staged changes", + func(cmd string, args ...string) *exec.Cmd { + assert.EqualValues(t, "git", cmd) + assert.EqualValues(t, []string{"diff", "--color", "--no-index", "/dev/null", "test.txt"}, args) + + return exec.Command("echo") + }, + &File{ + Name: "test.txt", + HasStagedChanges: false, + Tracked: false, + }, }, } - for _, file := range files { - t.Run(file.Name, func(t *testing.T) { - assert.NotContains(t, gitCommand.Diff(file), "error") + for _, s := range scenarios { + t.Run(s.testName, func(t *testing.T) { + gitCmd := newDummyGitCommand() + gitCmd.OSCommand.command = s.command + gitCmd.Diff(s.file) }) } } diff --git a/test/repos/lots_of_diffs.sh b/test/repos/lots_of_diffs.sh deleted file mode 100755 index 08c743f35..000000000 --- a/test/repos/lots_of_diffs.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -set -ex; rm -rf repo; mkdir repo; cd repo - -git init -git config user.email "test@example.com" -git config user.name "Lazygit Tester" - - -echo "deleted" > deleted_staged -echo "deleted_unstaged" > deleted_unstaged -echo "modified_staged" > modified_staged -echo "modified_unstaged" > modified_unstaged -echo "renamed" > renamed_before - -git add . -git commit -m "files to delete" -rm deleted_staged -rm deleted_unstaged - -rm renamed_before -echo "renamed" > renamed_after -echo "more" >> modified_staged -echo "more" >> modified_unstaged -echo "untracked_staged" > untracked_staged -echo "untracked_unstaged" > untracked_unstaged -echo "blah" > "file with space staged" -echo "blah" > "file with space unstaged" -echo "same name as branch" > master - -git add deleted_staged -git add modified_staged -git add untracked_staged -git add "file with space staged" -git add renamed_before -git add renamed_after \ No newline at end of file From 70ee4faf15a15ebb8ae28db70fa52dd2e33f6c1e Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Thu, 20 Sep 2018 09:48:56 +1000 Subject: [PATCH 5/9] add removeAll to git --- pkg/commands/git.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/commands/git.go b/pkg/commands/git.go index c37ca9b47..4163b46e9 100644 --- a/pkg/commands/git.go +++ b/pkg/commands/git.go @@ -101,6 +101,7 @@ func NewGitCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.Localizer) Repo: repo, getGlobalGitConfig: gitconfig.Global, getLocalGitConfig: gitconfig.Local, + removeFile: os.RemoveAll, }, nil } From 227067fdd11669bd4f991af5d139659df7fc5921 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 22 Sep 2018 13:44:48 +1000 Subject: [PATCH 6/9] use lineheight rather than buffer length --- Gopkg.lock | 4 ++-- go.mod | 2 +- vendor/github.com/jesseduffield/gocui/view.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 540b26052..4b84d6537 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -189,11 +189,11 @@ [[projects]] branch = "master" - digest = "1:d6df25dee1274e63c25f84c257bc504359f975dedb791eec7a5b51992146bb76" + digest = "1:66bb9b4a5abb704642fccba52a84a7f7feef2d9623f87b700e52a6695044723f" name = "github.com/jesseduffield/gocui" packages = ["."] pruneopts = "NUT" - revision = "4fca348422d8b6136e801b222858204a35ee369a" + revision = "03e26ff3f1de2c1bc2205113c3aba661312eee00" [[projects]] branch = "master" diff --git a/go.mod b/go.mod index 61692f46e..bfa4f7cf4 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/heroku/rollrus v0.0.0-20180515183152-fc0cef2ff331 github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 github.com/jesseduffield/go-getter v0.0.0-20180822080847-906e15686e63 - github.com/jesseduffield/gocui v0.0.0-20180919095827-4fca348422d8 + github.com/jesseduffield/gocui v0.0.0-20180921065632-03e26ff3f1de github.com/jesseduffield/termbox-go v0.0.0-20180919093808-1e272ff78dcb github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go index 46b86ec2a..939d1bdfa 100644 --- a/vendor/github.com/jesseduffield/gocui/view.go +++ b/vendor/github.com/jesseduffield/gocui/view.go @@ -447,8 +447,8 @@ func (v *View) ViewBufferLines() []string { return lines } -func (v *View) ViewLinesHeight() int { - return len(v.viewLines) +func (v *View) LinesHeight() int { + return len(v.lines) } // ViewBuffer returns a string with the contents of the view's buffer that is From 619c28ce56c50b6472d75158211f4bc6141b1bfd Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 22 Sep 2018 13:44:48 +1000 Subject: [PATCH 7/9] use lineheight rather than buffer length --- Gopkg.lock | 4 ++-- go.mod | 2 +- pkg/gui/view_helpers.go | 4 ++-- vendor/github.com/jesseduffield/gocui/view.go | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 540b26052..4b84d6537 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -189,11 +189,11 @@ [[projects]] branch = "master" - digest = "1:d6df25dee1274e63c25f84c257bc504359f975dedb791eec7a5b51992146bb76" + digest = "1:66bb9b4a5abb704642fccba52a84a7f7feef2d9623f87b700e52a6695044723f" name = "github.com/jesseduffield/gocui" packages = ["."] pruneopts = "NUT" - revision = "4fca348422d8b6136e801b222858204a35ee369a" + revision = "03e26ff3f1de2c1bc2205113c3aba661312eee00" [[projects]] branch = "master" diff --git a/go.mod b/go.mod index 61692f46e..bfa4f7cf4 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/heroku/rollrus v0.0.0-20180515183152-fc0cef2ff331 github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 github.com/jesseduffield/go-getter v0.0.0-20180822080847-906e15686e63 - github.com/jesseduffield/gocui v0.0.0-20180919095827-4fca348422d8 + github.com/jesseduffield/gocui v0.0.0-20180921065632-03e26ff3f1de github.com/jesseduffield/termbox-go v0.0.0-20180919093808-1e272ff78dcb github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 5178bd4d9..e9362c41f 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -183,7 +183,7 @@ func (gui *Gui) cursorDown(g *gocui.Gui, v *gocui.View) error { } cx, cy := v.Cursor() ox, oy := v.Origin() - ly := len(v.BufferLines()) - 1 + ly := v.LinesHeight() - 1 _, height := v.Size() maxY := height - 1 @@ -219,7 +219,7 @@ func (gui *Gui) correctCursor(v *gocui.View) error { ox, oy := v.Origin() _, height := v.Size() maxY := height - 1 - ly := len(v.BufferLines()) - 1 + ly := v.LinesHeight() - 1 if oy+cy <= ly { return nil } diff --git a/vendor/github.com/jesseduffield/gocui/view.go b/vendor/github.com/jesseduffield/gocui/view.go index 46b86ec2a..939d1bdfa 100644 --- a/vendor/github.com/jesseduffield/gocui/view.go +++ b/vendor/github.com/jesseduffield/gocui/view.go @@ -447,8 +447,8 @@ func (v *View) ViewBufferLines() []string { return lines } -func (v *View) ViewLinesHeight() int { - return len(v.viewLines) +func (v *View) LinesHeight() int { + return len(v.lines) } // ViewBuffer returns a string with the contents of the view's buffer that is From 4e0d0f7d75642472abc10d500989716bbd974f41 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Sep 2018 13:09:54 +1000 Subject: [PATCH 8/9] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 4f40e8f8e..e20de5900 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,11 @@ For contributor discussion about things not better discussed here in the repo, j [![Slack](/docs/resources/slack_rgb.png)](https://join.slack.com/t/lazygit/shared_invite/enQtNDE3MjIwNTYyMDA0LTM3Yjk3NzdiYzhhNTA1YjM4Y2M4MWNmNDBkOTI0YTE4YjQ1ZmI2YWRhZTgwNjg2YzhhYjg3NDBlMmQyMTI5N2M) +## Donate +If you would like to support the development of lazygit, please donate + +[![Donate](https://d1iczxrky3cnb2.cloudfront.net/button-medium-blue.png)](https://donorbox.org/lazygit) + ## Work in progress This is still a work in progress so there's still bugs to iron out and as this is my first project in Go the code could no doubt use an increase in quality, From 3d751c03fe34ac8547dfd0e39d8964129ec4c095 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 23 Sep 2018 14:13:10 +1000 Subject: [PATCH 9/9] add donation link to status panel --- pkg/gui/status_panel.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/pkg/gui/status_panel.go b/pkg/gui/status_panel.go index 6948e9678..89b3e997e 100644 --- a/pkg/gui/status_panel.go +++ b/pkg/gui/status_panel.go @@ -2,6 +2,7 @@ package gui import ( "fmt" + "strings" "github.com/fatih/color" "github.com/jesseduffield/gocui" @@ -51,14 +52,16 @@ func (gui *Gui) handleCheckForUpdate(g *gocui.Gui, v *gocui.View) error { } func (gui *Gui) handleStatusSelect(g *gocui.Gui, v *gocui.View) error { - dashboardString := fmt.Sprintf( - "%s\n\n%s\n\n%s\n\n%s\n\n%s", - lazygitTitle(), - "Keybindings: https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md", - "Config Options: https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md", - "Tutorial: https://www.youtube.com/watch?v=VDXvbHZYeKY", - "Raise an Issue: https://github.com/jesseduffield/lazygit/issues", - ) + dashboardString := strings.Join( + []string{ + lazygitTitle(), + "Copyright (c) 2018 Jesse Duffield", + "Keybindings: https://github.com/jesseduffield/lazygit/blob/master/docs/Keybindings.md", + "Config Options: https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md", + "Tutorial: https://www.youtube.com/watch?v=VDXvbHZYeKY", + "Raise an Issue: https://github.com/jesseduffield/lazygit/issues", + "Buy Jesse a coffee: https://donorbox.org/lazygit", + }, "\n\n") if err := gui.renderString(g, "main", dashboardString); err != nil { return err