run input syntax is not documented
Opened this issue · 1 comments
PerMildner commented
As far as I can see there is no documentation except for the README.md
file and it does not say anything about the syntax of the input to the s5cmd run
command.
In particular it does not say anything about how to quote file/object names with whitespace or other special characters.
kucukaslan commented
The relevant code snippet
Lines 105 to 147 in c1c7ee3
It appears that:
- each line is trimmed of spaces via strings.TrimSpace
- empty lines and the lines starting with
#
are ignored - the line is split via kballard/go-shellquote.Split "...according to /bin/sh's word-splitting rules"
- later the line is parsed to command and the rest (flags and arguments) via https://pkg.go.dev/flag#FlagSet.Parse
AFAIU: we can say that each line must be formatted so that running s5cmd {line}
on the shell would work as intended. Except that the run
command is not allowed to be called in this way.