Skip to content

Commit

Permalink
aggregating run command params
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Oct 14, 2017
1 parent 7b8ceb9 commit c100bd7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ func openAction(c *cli.Context) error {
}

func runAction(c *cli.Context) error {
if err := argumentsCheck(c, 2, 2); err != nil {
if err := argumentsCheck(c, 2, -1); err != nil {
return printErrorWithHelp(c, err)
}
alias := c.Args().Get(0)
command := c.Args().Get(1)
args := c.Args()
alias := args.Get(0)
command := strings.Join(append(args[:0], args[1:]...), " ")

userAlias := strings.Split(alias, "@")
tmpUser, tmpAlias := "", alias
Expand Down

0 comments on commit c100bd7

Please # to comment.