Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hof/cli: remove --tui flag from eval command #374

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .hof/shadow/cli/cmd/hof/flags/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type EvalFlagpole struct {
Resolve bool
Defaults bool
Final bool
Tui bool
}

var EvalFlags EvalFlagpole
Expand All @@ -51,7 +50,6 @@ func SetupEvalFlags(fset *pflag.FlagSet, fpole *EvalFlagpole) {
fset.BoolVarP(&(fpole.Resolve), "resolve", "", false, "resolve references in value")
fset.BoolVarP(&(fpole.Defaults), "defaults", "", false, "use default values if not set")
fset.BoolVarP(&(fpole.Final), "final", "", true, "finalize the value")
fset.BoolVarP(&(fpole.Tui), "tui", "", false, "open hof's TUI and browse your CUE")
}

func init() {
Expand Down
2 changes: 0 additions & 2 deletions cmd/hof/flags/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type EvalFlagpole struct {
Resolve bool
Defaults bool
Final bool
Tui bool
}

var EvalFlags EvalFlagpole
Expand All @@ -51,7 +50,6 @@ func SetupEvalFlags(fset *pflag.FlagSet, fpole *EvalFlagpole) {
fset.BoolVarP(&(fpole.Resolve), "resolve", "", false, "resolve references in value")
fset.BoolVarP(&(fpole.Defaults), "defaults", "", false, "use default values if not set")
fset.BoolVarP(&(fpole.Final), "final", "", true, "finalize the value")
fset.BoolVarP(&(fpole.Tui), "tui", "", false, "open hof's TUI and browse your CUE")
}

func init() {
Expand Down
7 changes: 0 additions & 7 deletions design/cmds/cue.cue
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,6 @@ EvalCommand: schema.Command & {
Type: "bool"
Default: "true"
Help: "finalize the value"
}, {
Name: "tui"
Long: "tui"
Short: ""
Type: "bool"
Default: "false"
Help: "open hof's TUI and browse your CUE"
}]
}

Expand Down
3 changes: 1 addition & 2 deletions docs/content/getting-started/cue.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ The enhancements are:

- additional methods for data placement
- increased flexibility for environment variables
- @userfiles() to include any file
- `--tui` flag to open hof's TUI for the commands
- `@userfiles()/--user-files` to include any file


### Hof & CUE Modules
Expand Down
6 changes: 0 additions & 6 deletions lib/cuecmd/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ import (
"github.com/hofstadter-io/hof/cmd/hof/flags"
"github.com/hofstadter-io/hof/lib/cuetils"
"github.com/hofstadter-io/hof/lib/runtime"
"github.com/hofstadter-io/hof/lib/tui/cmd"
)

func Eval(args []string, rflags flags.RootPflagpole, cflags flags.EvalFlagpole) error {

if cflags.Tui {
args = append([]string{"eval"}, args...)
return cmd.Cmd(args, rflags)
}

start := time.Now()
R, err := runtime.New(args, rflags)

Expand Down
Loading