diff --git a/cmd/root.go b/cmd/root.go index ecbb50c..4f94676 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -25,7 +25,7 @@ import ( "github.com/veandco/go-sdl2/sdl" ) -var preset string +var presets []string var scriptPath string var transition bool @@ -43,12 +43,6 @@ func (s *script) load(path string) error { } func getPresets() []string { - var presets []string - - if preset != "" { - presets = []string{preset} - } - if scriptPath != "" { var s script s.load(scriptPath) @@ -170,8 +164,8 @@ func init() { // when this action is called directly. rootCmd.Flags().BoolVarP(&transition, "transition", "t", false, "smoothly transition between presets") - rootCmd.Flags().StringVarP(&preset, "preset", "p", "", "preset file to use") + rootCmd.Flags().StringArrayVarP(&presets, "presets", "p", []string{}, "preset files to use") rootCmd.Flags().StringVarP(&scriptPath, "script", "s", "", "script file to use") - rootCmd.MarkFlagsMutuallyExclusive("preset", "script") + rootCmd.MarkFlagsMutuallyExclusive("presets", "script") }