xh doesn't translate `[` and `]` to curl correctly.
barkoder opened this issue · comments
barkoder commented
xh --curl https://example.com/[something]
gives
curl 'https://example.com/[something]'
which doesn't work.
[
and ]
will need to be percent encoded to %5B
and %5D
respectively or they need to be escaped.
This works - curl 'https://example.com/%5Bsomething%5D'
As does this - curl 'https://example.com/\[something\]'
Could you fix this ?
Thanks!
Mohamed Daahir commented
Another option is to disable URL globbing if we detect any of cURL's reserved URL symbols i.e [
, ]
, {
, or }
$ xh --curl https://example.com/[something]
curl -g 'https://example.com/[something]'