openapi-cli-generator icon indicating copy to clipboard operation
openapi-cli-generator copied to clipboard

J how to escape "," symbols?

Open h0x91b-wix opened this issue 5 years ago • 1 comments

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 avatar Dec 31 '20 15:12 h0x91b-wix

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"
} 

h0x91b-wix avatar Apr 25 '21 15:04 h0x91b-wix