Appears to be a functional migration to cobra

This commit is contained in:
David Dworken 2022-11-14 20:34:36 -08:00
parent 0667494239
commit be2cde72c2
No known key found for this signature in database
3 changed files with 3 additions and 8 deletions

View File

@ -3,7 +3,6 @@ package cmd
import (
"context"
"fmt"
"os"
"strings"
"github.com/ddworken/hishtory/client/hctx"
@ -57,7 +56,7 @@ var exportCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) {
ctx := hctx.MakeContext()
lib.CheckFatalError(lib.ProcessDeletionRequests(ctx))
export(ctx, strings.Join(os.Args[2:], " "))
export(ctx, strings.Join(args, " "))
},
}

View File

@ -18,6 +18,7 @@ var saveHistoryEntryCmd = &cobra.Command{
Use: "saveHistoryEntry",
Hidden: true,
Short: "[Internal-only] The command used to save history entries",
DisableFlagParsing: true,
Run: func(cmd *cobra.Command, args []string) {
ctx := hctx.MakeContext()
lib.CheckFatalError(maybeUploadSkippedHistoryEntries(ctx))

View File

@ -8,9 +8,4 @@ func main() {
cmd.Execute()
}
// TODO(feature): Add a session_id column that corresponds to the shell session the command was run in
/*
Remaining things:
* Acutally migrate saveHistoryEntry to cobra
*/
// TODO(feature): Add a session_id column that corresponds to the shell session the command was run in