refactor: add screen clear to root command

This commit is contained in:
Slug-Boi
2024-10-24 20:49:32 +02:00
parent 2a222ad488
commit 55dd1bc5ee
+3 -1
View File
@@ -6,6 +6,7 @@ import (
"main/src_code/go_src/cmd/utils" "main/src_code/go_src/cmd/utils"
"os" "os"
"github.com/inancgumus/screen"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
@@ -34,6 +35,8 @@ var rootCmd = &cobra.Command{
case 0: case 0:
// launch the tui // launch the tui
args = append(args, tui.Entry_CM()) args = append(args, tui.Entry_CM())
screen.Clear()
screen.MoveTopLeft()
sel_auth := tui.Entry() sel_auth := tui.Entry()
message = utils.Commit(args[0], sel_auth) message = utils.Commit(args[0], sel_auth)
goto tui goto tui
@@ -82,5 +85,4 @@ func Execute() {
func init() { func init() {
rootCmd.Flags().BoolP("print", "p", false, "Prints the commit message to the console") rootCmd.Flags().BoolP("print", "p", false, "Prints the commit message to the console")
} }