You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
s := "pg_dump db -U usr -F c > bck.dump"
argv, _ := shellwords.Parse(s)
for _, v := range argv {
println(v)
}
Which returned:
pg_dump
db
-U
usr
-F
c
I noticed in the source code (https://github.com/mattn/go-shellwords/blob/master/shellwords.go#L246) that we're not accepting ">" as a token amongst other characters like "|". Since these characters are very important in certain contexts, I think it might make sense to add a flag which will recognize them as tokens (by flag I mean something similar to p.ParseBacktick = true).
The text was updated successfully, but these errors were encountered:
Specifically, I was testing:
Which returned:
I noticed in the source code (https://github.com/mattn/go-shellwords/blob/master/shellwords.go#L246) that we're not accepting ">" as a token amongst other characters like "|". Since these characters are very important in certain contexts, I think it might make sense to add a flag which will recognize them as tokens (by flag I mean something similar to
p.ParseBacktick = true
).The text was updated successfully, but these errors were encountered: