fix: handle input with several words
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
e106e1989d
commit
bfde701922
1 changed files with 11 additions and 1 deletions
|
|
@ -52,7 +52,17 @@ func (s *Shell) Run(action string, args cli.Args) error {
|
|||
s.Order,
|
||||
)
|
||||
|
||||
input := strings.Trim(args.Get(0), " ")
|
||||
var inputs []string
|
||||
|
||||
for i := 0; i < args.Len(); i++ {
|
||||
arg := strings.Trim(args.Get(i), " \t\t\n")
|
||||
|
||||
if arg != "" {
|
||||
inputs = append(inputs, arg)
|
||||
}
|
||||
}
|
||||
|
||||
input := strings.Join(inputs, " ")
|
||||
|
||||
switch input {
|
||||
case "":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue