mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
refactor: add screen clear to root command
This commit is contained in:
@@ -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")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user