zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-users@zsh.org
Subject: Re: Problem with "?" symbol
Date: Tue, 3 Aug 2010 14:46:41 +0200	[thread overview]
Message-ID: <20100803124641.GB7217@prunille.vinc17.org> (raw)
In-Reply-To: <AANLkTimLO4gf=Gh9y9Z20OnFQ7sLoJQX-yeA9+peq_vx@mail.gmail.com>

Hi,

On 2010-08-03 15:26:30 +0300, Volodya Khomchak wrote:
> I faced with next issue in zsh. I'm new with this and don't have any
> idea why this occurs.
> So the problem is next:
> 
> [kolombo:~]> curl -vvv -k https://HOST.COM/page/page2/?virtual_serial=101032
> zsh: no matches found:
> https://esx16-bsd05.qa.sbr.ironport.com/atlas/ipcs/?virtual_serial=101032
> 
> This command fails on "?" symbol, do you have any idea why  this occurs ?

The ? is a special character for the shell (which cannot know
whether the argument is a filename or not). There are 2 solutions:

1. Quote the character manually, e.g.

     cmd foo\?bar

   or

     cmd "foo?bar"

2. Quote the character automatically:

     autoload -Uz url-quote-magic
     zle -N self-insert url-quote-magic

   in your ".zshrc".

Note: solution (2) is only a heuristic, which works well in practice,
but may need more configuration in specific cases.

> Also I know that this could be resolved by this:
> alias curl="noglob curl"

Not necessarily a good solution, as curl also works with filename
arguments.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


  parent reply	other threads:[~2010-08-03 12:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 12:26 Volodya Khomchak
2010-08-03 12:35 ` Alexey I. Froloff
2010-08-03 13:06   ` René 'Necoro' Neumann
2010-08-03 15:17     ` Bart Schaefer
2010-08-03 12:39 ` Jérémie Roquet
2010-08-03 12:50   ` Vincent Lefevre
2010-08-03 12:46 ` Vincent Lefevre [this message]
2010-08-08 12:10 ` Bryan Hunt
2010-08-03 13:35 Manuel Presnitz
2010-08-03 14:46 ` Dan Nelson
2010-08-03 21:05   ` Vincent Lefevre
2010-08-08 12:49   ` Nadav Har'El
2010-08-08 13:50     ` Benjamin R. Haskell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100803124641.GB7217@prunille.vinc17.org \
    --to=vincent@vinc17.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).