mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Wire up the git commit hash to the TUI banner requesting code
This commit is contained in:
parent
964359c7c5
commit
73807746a7
@ -205,7 +205,7 @@ func getRows(ctx *context.Context, query string) ([]table.Row, int, error) {
|
||||
return rows, len(data), nil
|
||||
}
|
||||
|
||||
func TuiQuery(ctx *context.Context, initialQuery string) error {
|
||||
func TuiQuery(ctx *context.Context, gitCommit, initialQuery string) error {
|
||||
lipgloss.SetColorProfile(termenv.ANSI)
|
||||
columns := []table.Column{
|
||||
{Title: "Hostname", Width: 25},
|
||||
@ -274,7 +274,7 @@ func TuiQuery(ctx *context.Context, initialQuery string) error {
|
||||
p.Send(doneDownloadingMsg{})
|
||||
}()
|
||||
go func() {
|
||||
banner, err := GetBanner(ctx, "TODO_WIRE_GIT_COMMIT_HERE")
|
||||
banner, err := GetBanner(ctx, gitCommit)
|
||||
if err != nil {
|
||||
if IsOfflineError(err) {
|
||||
p.Send(offlineMsg{})
|
||||
|
@ -36,7 +36,7 @@ func main() {
|
||||
case "tquery":
|
||||
ctx := hctx.MakeContext()
|
||||
lib.CheckFatalError(lib.ProcessDeletionRequests(ctx))
|
||||
lib.CheckFatalError(lib.TuiQuery(ctx, strings.Join(os.Args[2:], " ")))
|
||||
lib.CheckFatalError(lib.TuiQuery(ctx, GitCommit, strings.Join(os.Args[2:], " ")))
|
||||
case "export":
|
||||
ctx := hctx.MakeContext()
|
||||
lib.CheckFatalError(lib.ProcessDeletionRequests(ctx))
|
||||
|
Loading…
Reference in New Issue
Block a user