Very naive REPL
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"esdi/repl"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func replCmdAction(cmd *cobra.Command, args []string) {
|
||||
repl := repl.NewREPL(repl.REPLCfg{
|
||||
PS1: "\rESDI > ",
|
||||
})
|
||||
repl.Start()
|
||||
}
|
||||
|
||||
// removeLabelCmd represents the removeLabel command
|
||||
var replCmd = &cobra.Command{
|
||||
Use: "repl",
|
||||
Short: "run the repl to interact with the display",
|
||||
Long: ``,
|
||||
Run: replCmdAction,
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(replCmd)
|
||||
}
|
||||
Reference in New Issue
Block a user