ficsit-cli-flake/cmd/profile/ls.go
2022-06-08 23:56:32 +03:00

28 lines
448 B
Go

package profile
import (
"github.com/satisfactorymodding/ficsit-cli/cli"
"github.com/spf13/cobra"
)
func init() {
Cmd.AddCommand(lsCmd)
}
var lsCmd = &cobra.Command{
Use: "ls",
Short: "List all profiles",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
global, err := cli.InitCLI()
if err != nil {
return err
}
for name := range global.Profiles.Profiles {
println(name)
}
return nil
},
}