-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
1,388 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
|
||
"github.com/hofstadter-io/hof/cmd/hof/ga" | ||
) | ||
|
||
var tuiLong = `hidden command for tui experiments` | ||
|
||
func TuiRun(args []string) (err error) { | ||
|
||
// you can safely comment this print out | ||
fmt.Println("not implemented") | ||
|
||
return err | ||
} | ||
|
||
var TuiCmd = &cobra.Command{ | ||
|
||
Use: "tui", | ||
|
||
Hidden: true, | ||
|
||
Short: "hidden command for tui experiments", | ||
|
||
Long: tuiLong, | ||
|
||
Run: func(cmd *cobra.Command, args []string) { | ||
|
||
ga.SendCommandPath(cmd.CommandPath()) | ||
|
||
var err error | ||
|
||
// Argument Parsing | ||
|
||
err = TuiRun(args) | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
extra := func(cmd *cobra.Command) bool { | ||
|
||
return false | ||
} | ||
|
||
ohelp := TuiCmd.HelpFunc() | ||
ousage := TuiCmd.UsageFunc() | ||
|
||
help := func(cmd *cobra.Command, args []string) { | ||
|
||
ga.SendCommandPath(cmd.CommandPath() + " help") | ||
|
||
if extra(cmd) { | ||
return | ||
} | ||
ohelp(cmd, args) | ||
} | ||
usage := func(cmd *cobra.Command) error { | ||
if extra(cmd) { | ||
return nil | ||
} | ||
return ousage(cmd) | ||
} | ||
|
||
thelp := func(cmd *cobra.Command, args []string) { | ||
help(cmd, args) | ||
} | ||
tusage := func(cmd *cobra.Command) error { | ||
return usage(cmd) | ||
} | ||
TuiCmd.SetHelpFunc(thelp) | ||
TuiCmd.SetUsageFunc(tusage) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ type EvalFlagpole struct { | |
Resolve bool | ||
Defaults bool | ||
Final bool | ||
Tui bool | ||
} | ||
|
||
var EvalFlags EvalFlagpole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
|
||
"github.com/hofstadter-io/hof/cmd/hof/flags" | ||
"github.com/hofstadter-io/hof/cmd/hof/ga" | ||
|
||
"github.com/hofstadter-io/hof/lib/tui" | ||
) | ||
|
||
var tuiLong = `hidden command for tui experiments` | ||
|
||
func TuiRun(args []string) (err error) { | ||
|
||
// you can safely comment this print out | ||
// fmt.Println("not implemented") | ||
|
||
err = tui.Cmd(args, flags.RootPflags) | ||
|
||
return err | ||
} | ||
|
||
var TuiCmd = &cobra.Command{ | ||
|
||
Use: "tui", | ||
|
||
Hidden: true, | ||
|
||
Short: "hidden command for tui experiments", | ||
|
||
Long: tuiLong, | ||
|
||
Run: func(cmd *cobra.Command, args []string) { | ||
|
||
ga.SendCommandPath(cmd.CommandPath()) | ||
|
||
var err error | ||
|
||
// Argument Parsing | ||
|
||
err = TuiRun(args) | ||
if err != nil { | ||
fmt.Println(err) | ||
os.Exit(1) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
extra := func(cmd *cobra.Command) bool { | ||
|
||
return false | ||
} | ||
|
||
ohelp := TuiCmd.HelpFunc() | ||
ousage := TuiCmd.UsageFunc() | ||
|
||
help := func(cmd *cobra.Command, args []string) { | ||
|
||
ga.SendCommandPath(cmd.CommandPath() + " help") | ||
|
||
if extra(cmd) { | ||
return | ||
} | ||
ohelp(cmd, args) | ||
} | ||
usage := func(cmd *cobra.Command) error { | ||
if extra(cmd) { | ||
return nil | ||
} | ||
return ousage(cmd) | ||
} | ||
|
||
thelp := func(cmd *cobra.Command, args []string) { | ||
help(cmd, args) | ||
} | ||
tusage := func(cmd *cobra.Command) error { | ||
return usage(cmd) | ||
} | ||
TuiCmd.SetHelpFunc(thelp) | ||
TuiCmd.SetUsageFunc(tusage) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ type EvalFlagpole struct { | |
Resolve bool | ||
Defaults bool | ||
Final bool | ||
Tui bool | ||
} | ||
|
||
var EvalFlags EvalFlagpole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package cmds | ||
|
||
import ( | ||
"github.com/hofstadter-io/hofmod-cli/schema" | ||
) | ||
|
||
TuiCommand: schema.Command & { | ||
Name: "tui" | ||
Usage: "tui" | ||
Short: "hidden command for tui experiments" | ||
Long: Short | ||
Hidden: true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.