danielgtaylor / openapi-cli-generator

Generate a CLI from an OpenAPI 3 specification
MIT License
179 stars 49 forks source link

J how to escape "," symbols? #41

Open h0x91b-wix opened 3 years ago

h0x91b-wix commented 3 years ago

Hey, I am trying to pass a string with , symbols in it, tried several ways, but didn't succeded to escape it..

❯ j foo :~ "http://example.com/a,b,c,d", bar: baz 
{
  "bar": "baz",
  "foo": [
    "http://example.com/a",
    "b",
    "c",
    "d"
  ]
}

foo should be a string in my case, not an array...

h0x91b-wix commented 3 years ago

Workaround:

echo -n "http://example.com/a,b,c,d" > /tmp/jbug.txt
j foo: @~/tmp/jbug.txt, bar: baz

{
  "bar": "baz",
  "foo": "http://example.com/a,b,c,d"
}