func (c Command) Prepare() (string, []string, error) {
	args := strings.Split(os.ExpandEnv(string(c)), " ")
	if len(args) == 0 || args[0] == "" {
		return "", nil, fmt.Errorf("prepare plugin command: no command found")
	}

	main := args[0]
	var cmdArgs []string
	if len(args) > 1 {
		cmdArgs = args[1:]
	}

	return main, cmdArgs, nil
}
// Prepare prepares the plugin command and parses out the
// main and args
Prepare prepares the plugin command and parses out the
main and args
// Prepare prepares the plugin command and parses out the // main and args
func (c Command) Prepare() (string, []string, error) {
	args := strings.Split(os.ExpandEnv(string(c)), " ")
	if len(args) == 0 || args[0] == "" {
		return "", nil, fmt.Errorf("prepare plugin command: no command found")
	}
	main := args[0]
	var cmdArgs []string
	if len(args) > 1 {
		cmdArgs = args[1:]
	}
	return main, cmdArgs, nil
}
func ( c Command ) Prepare ( ) ( string , [ ] string , error ) { args := strings . Split ( os . ExpandEnv ( string ( c ) ) , " " ) if len ( args ) == 0 || args [ 0 ] == " " { return " " , nil , fmt . Errorf ( " " ) } main := args [ 0 ] var cmdArgs [ ] string if len ( args ) > 1 { cmdArgs = args [ 1 : ] } return main , cmdArgs , nil }
Prepare prepares the plugin command and parses out the
main and args
Prepare prepares the plugin command and parses out the main and args