From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7742 invoked by alias); 18 Mar 2013 13:48:20 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17712 Received: (qmail 6855 invoked from network); 18 Mar 2013 13:48:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Mon, 18 Mar 2013 14:47:59 +0100 From: Vincent Lefevre To: zsh-users@zsh.org Subject: Re: problem with zsh and wildcards in scp commands Message-ID: <20130318134759.GD17299@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org References: <1363517161.73898.YahooMailNeo@web140003.mail.bf1.yahoo.com> <20130317123308.GA6254@marlov> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130317123308.GA6254@marlov> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6300-vl-r57845 (2013-03-04) On 2013-03-17 13:33:08 +0100, Eike von Seggern wrote: > Hi John, > > you need to escape the *, e.g. by putting it into quotes: > > scp "user@host:/path/to/*" . > > Otherwise zsh tries to expand it on your local machine and fails, hence > the "zsh:…" message. Note that zsh's default behaviour differs here from > bash in that bash inserts a literal * if the glob-expansion failed while > zsh returns with the error you've encountered. Concerning this behavior, zsh is more secure than POSIX shells such as bash. But to have * escaped automatically, url-quote-magic can be used. See e.g. http://traviscj.com/tricks/?p=8 http://superuser.com/questions/420525/scp-with-zsh-no-matches-found and more generally: https://www.google.com/search?q=%22url-quote-magic%22+%22scp%22 -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)