Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Sending CURL requests through ZSH fails
- X-seq: zsh-users 19264
- From: Clint Hepner <clint.hepner@xxxxxxxxx>
- To: Yazin <i@xxxxxx>
- Subject: Re: Sending CURL requests through ZSH fails
- Date: Sun, 19 Oct 2014 08:41:48 -0400
- Cc: "<zsh-users@xxxxxxx>" <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=content-type:mime-version:subject:from:in-reply-to:date:cc         :content-transfer-encoding:message-id:references:to;        bh=Li9IPllbUvMC3Ssrw6t+iRMXZ6g1dg+oWi1J2TVOXHE=;        b=AYJXtIZHpzV2tN7g9pP0pc0TBA+51cl60dfaIsBEPd3iBdv/XlnsKiR5j/iJXQavSN         qJonHWoTwtFYDT01Dl9axrdrusaVkCekWqTuosXaRmoI2k4dqW5/P0ZrbMhApoGS3lRO         lK97VohAH4iERfhrSvD1vA/daJ2Zc3JGgAETb/RrQriy/Y4gDKCLWrzUWLHcCMddw1pb         XOzj1KVWWEy6gHYXJi+EaG9xM6uBwYIlXZUs4oEjMO004arZYl+7pd7nrRifQukNAVfN         4Bx8RFSgtU0CsA1V7GobyG+Fs0nBV67fZlFuCnYt8A79+RtDijgrCHwVxGFq4CW7goYr         oZ1g==
- In-reply-to: <5443A526.2010604@yaz.in>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <5443A526.2010604@yaz.in>
The brackets are interpreted as a glob which zsh attempts to expand to files in the current directory. You need to quote them, for example, 
      -d "card[cvv]=123" \
so that the brackets are passed literally to curl. 
--
Clint
> On Oct 19, 2014, at 7:48 AM, Yazin <i@xxxxxx> wrote:
> 
> Hi,
> 
> I've got the following CURL request. Sending it through ZSH fails, while
> sending it through the default Ubuntu shell (SH) works.
> 
> Command:
> curl https://api.stripe.com/v1/charges \
>   -u sk_test_123495219ba2f84566e63fca0535d343: \
>   -d amount=10.500 \
>   -d currency=usd \
>   -d card[number]=4242424242424242 \
>   -d card[exp_month]=11 \
>   -d card[exp_year]=2014 \
>   -d card[cvv]=123 \
>   -d "description=Charge for test@xxxxxxxxxxx"
> 
> Expected output (the output I get from SH):
> {
>  "error": {
>    "type": "invalid_request_error",
>    "message": "Invalid API Key provided:
> sk_test_****************************d343"
>  }
> }
> 
> Actual output (from ZSH):
> zsh: no matches found: card[number]=4242424242424242
Messages sorted by:
Reverse Date,
Date,
Thread,
Author