mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-29 11:44:53 +01:00
24 lines
497 B
Go
24 lines
497 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
|
||
|
"github.com/ddworken/hishtory/client/hctx"
|
||
|
"github.com/ddworken/hishtory/client/lib"
|
||
|
"github.com/ddworken/hishtory/client/webui"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
var webUiCmd = &cobra.Command{
|
||
|
Use: "start-web-ui",
|
||
|
Short: "Serve a basic web UI for interacting with your shell history",
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
lib.CheckFatalError(webui.StartWebUiServer(hctx.MakeContext()))
|
||
|
os.Exit(1)
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
rootCmd.AddCommand(webUiCmd)
|
||
|
}
|