Commit bcdf5a77 authored by Matt Bell's avatar Matt Bell

commands/cli: When parsing stdin as string argument, split lines into separate tokens

parent 3638a0d1
......@@ -260,7 +260,8 @@ func appendStdinAsString(args []string, stdin *os.File) ([]string, *os.File, err
return nil, nil, err
}
return append(args, buf.String()), nil, nil
input := strings.TrimSpace(buf.String())
return append(args, strings.Split(input, "\n")...), nil, nil
}
func appendFile(args []cmds.File, inputs []string, argDef *cmds.Argument, recursive bool) ([]cmds.File, []string, error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment