github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/cmd/state/internal/cmdtree/history.go (about)

     1  package cmdtree
     2  
     3  import (
     4  	"github.com/ActiveState/cli/internal/captain"
     5  	"github.com/ActiveState/cli/internal/locale"
     6  	"github.com/ActiveState/cli/internal/primer"
     7  	"github.com/ActiveState/cli/internal/runners/history"
     8  )
     9  
    10  func newHistoryCommand(prime *primer.Values) *captain.Command {
    11  	initRunner := history.NewHistory(prime)
    12  
    13  	params := history.HistoryParams{}
    14  	return captain.NewCommand(
    15  		"history",
    16  		locale.Tl("history_title", "Viewing Project History"),
    17  		locale.T("history_cmd_description"),
    18  		prime,
    19  		[]*captain.Flag{},
    20  		[]*captain.Argument{},
    21  		func(ccmd *captain.Command, _ []string) error {
    22  			return initRunner.Run(&params)
    23  		},
    24  	).SetGroup(VCSGroup).SetSupportsStructuredOutput()
    25  }