mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-16 18:41:03 +01:00
Appears to be a functional migration to cobra
This commit is contained in:
parent
0667494239
commit
be2cde72c2
@ -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, " "))
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user