mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-25 06:22:24 +02: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
|
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)
|
lipgloss.SetColorProfile(termenv.ANSI)
|
||||||
columns := []table.Column{
|
columns := []table.Column{
|
||||||
{Title: "Hostname", Width: 25},
|
{Title: "Hostname", Width: 25},
|
||||||
@ -274,7 +274,7 @@ func TuiQuery(ctx *context.Context, initialQuery string) error {
|
|||||||
p.Send(doneDownloadingMsg{})
|
p.Send(doneDownloadingMsg{})
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
banner, err := GetBanner(ctx, "TODO_WIRE_GIT_COMMIT_HERE")
|
banner, err := GetBanner(ctx, gitCommit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if IsOfflineError(err) {
|
if IsOfflineError(err) {
|
||||||
p.Send(offlineMsg{})
|
p.Send(offlineMsg{})
|
||||||
|
@ -36,7 +36,7 @@ func main() {
|
|||||||
case "tquery":
|
case "tquery":
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
lib.CheckFatalError(lib.ProcessDeletionRequests(ctx))
|
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":
|
case "export":
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
lib.CheckFatalError(lib.ProcessDeletionRequests(ctx))
|
lib.CheckFatalError(lib.ProcessDeletionRequests(ctx))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user