如何将curl与包含括号字符的网址一起使用?

ori*_*ngs 10 curl

我对使用包含方括号的任何URL使用curl时遇到了一些麻烦.

例如:

$ curl 'http://example.org/?param[0]=true'
curl: (3) [globbing] bad range in column 27
Run Code Online (Sandbox Code Playgroud)

如何正确地转义方括号以便curl发出请求?

ori*_*ngs 19

事实证明,卷曲试图将方括号解释为一个圆形图案.

幸运的是,有一个卷曲选项可以关闭全局行为:

$ curl -g 'http://example.org/?param[0]=true'
Run Code Online (Sandbox Code Playgroud)