diff --git a/client/cmd/reupload.go b/client/cmd/reupload.go new file mode 100644 index 0000000..08d09d7 --- /dev/null +++ b/client/cmd/reupload.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/ddworken/hishtory/client/hctx" + "github.com/ddworken/hishtory/client/lib" + "github.com/spf13/cobra" +) + +var reuploadCmd = &cobra.Command{ + Use: "reupload", + Short: "[Debug Only] Reupload your entire hiSHtory to all other devices", + Run: func(cmd *cobra.Command, args []string) { + lib.CheckFatalError(lib.Reupload(hctx.MakeContext())) + }, +} + +func init() { + rootCmd.AddCommand(reuploadCmd) +} diff --git a/hishtory.go b/hishtory.go index d335fea..503566b 100644 --- a/hishtory.go +++ b/hishtory.go @@ -73,11 +73,10 @@ func main() { fallthrough case "config-add": fallthrough + case "reupload": + fallthrough case "config-delete": cmd.Execute() - case "reupload": - // Purposefully undocumented since this command is generally not necessary to run - lib.CheckFatalError(lib.Reupload(hctx.MakeContext())) case "-h": fallthrough case "help":