| 1 | package custom_commandsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/" |
| 5 | |
| 6 | "github.com/jesseduffield/lazygit/pkg/configscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/" |
| 7 | . "github.com/jesseduffield/lazygit/pkg/integration/componentsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/" |
| 8 | ) |
| 9 | |
| 10 | var ShowOutputInPanelscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel. = NewIntegrationTestscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTest().(NewIntegrationTestArgsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#{ |
| 11 | Descriptionscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#Description.: "Run a command and show the output in a panel", |
| 12 | ExtraCmdArgsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#ExtraCmdArgs.: []string{}, |
| 13 | Skipscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#Skip.: false, |
| 14 | SetupReposcip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#SetupRepo.: func(shellscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:shell. *Shellscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Shell#) { |
| 15 | shellscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:shell..EmptyCommitscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Shell#EmptyCommit().("my change") |
| 16 | }, |
| 17 | SetupConfigscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#SetupConfig.: func(cfgscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:cfg. *configscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/.AppConfigscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/AppConfig#) { |
| 18 | cfgscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:cfg..GetUserConfigscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/AppConfig#GetUserConfig().().CustomCommandsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/UserConfig#CustomCommands. = []configscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/.CustomCommandscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#{ |
| 19 | { |
| 20 | Keyscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Key.: "X", |
| 21 | Contextscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Context.: "commits", |
| 22 | Commandscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Command.: "printf '%s' '{{ .SelectedLocalCommit.Name }}'", |
| 23 | Outputscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Output.: "popup", |
| 24 | }, |
| 25 | { |
| 26 | Keyscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Key.: "Y", |
| 27 | Contextscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Context.: "commits", |
| 28 | Commandscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Command.: "printf '%s' '{{ .SelectedLocalCommit.Name }}'", |
| 29 | Outputscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#Output.: "popup", |
| 30 | OutputTitlescip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/CustomCommand#OutputTitle.: "Subject of commit {{ .SelectedLocalCommit.Hash }}", |
| 31 | }, |
| 32 | } |
| 33 | }, |
| 34 | Runscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/NewIntegrationTestArgs#Run.: func(tscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:t. *TestDriverscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TestDriver#, keysscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:keys. configscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/.KeybindingConfigscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/config`/KeybindingConfig#) { |
| 35 | tscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:t..Viewsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TestDriver#Views().().Commitsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Views#Commits().(). |
| 36 | Focusscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/ViewDriver#Focus().(). |
| 37 | Linesscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/ViewDriver#Lines().( |
| 38 | Containsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Contains().("my change").IsSelectedscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TextMatcher#IsSelected().(), |
| 39 | ). |
| 40 | Pressscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/ViewDriver#Press().("X") |
| 41 | |
| 42 | tscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:t..ExpectPopupscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TestDriver#ExpectPopup().().Alertscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Popup#Alert().(). |
| 43 | // Uses cmd string as title if no outputTitle is provided |
| 44 | Titlescip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/AlertDriver#Title().(Equalsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Equals().("printf '%s' 'my change'")). |
| 45 | Contentscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/AlertDriver#Content().(Equalsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Equals().("my change")). |
| 46 | Confirmscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/AlertDriver#Confirm().() |
| 47 | |
| 48 | tscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:t..Viewsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TestDriver#Views().().Commitsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Views#Commits().(). |
| 49 | Pressscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/ViewDriver#Press().("Y") |
| 50 | |
| 51 | hash := tscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:t..Gitscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TestDriver#Git().().GetCommitHashscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Git#GetCommitHash().("HEAD") |
| 52 | tscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/tests/custom_commands`/ShowOutputInPanel:t..ExpectPopupscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/TestDriver#ExpectPopup().().Alertscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Popup#Alert().(). |
| 53 | // Uses provided outputTitle with template fields resolved |
| 54 | Titlescip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/AlertDriver#Title().(Equalsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Equals().(fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().("Subject of commit %s", hash))). |
| 55 | Contentscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/AlertDriver#Content().(Equalsscip-go gomod github.com/jesseduffield/lazygit . `github.com/jesseduffield/lazygit/pkg/integration/components`/Equals().("my change")) |
| 56 | }, |
| 57 | }) |