Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: problem with zsh and wildcards in scp commands



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@xxxxxxxxxx> - 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)



Messages sorted by: Reverse Date, Date, Thread, Author