zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-users@zsh.org
Subject: Re: problem with zsh and wildcards in scp commands
Date: Mon, 18 Mar 2013 14:47:59 +0100	[thread overview]
Message-ID: <20130318134759.GD17299@xvii.vinc17.org> (raw)
In-Reply-To: <20130317123308.GA6254@marlov>

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 <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


  reply	other threads:[~2013-03-18 13:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-17 10:46 John
2013-03-17 12:33 ` Eike von Seggern
2013-03-18 13:47   ` Vincent Lefevre [this message]
2013-03-17 16:03 John
2013-03-17 16:20 ` Jérémie Roquet
2013-03-17 16:24   ` John
2013-03-17 16:31     ` Jérémie Roquet
2013-03-17 16:55       ` Valodim Skywalker
2013-03-17 19:21 John

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=20130318134759.GD17299@xvii.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).