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

Re: problem with zsh and wildcards in scp commands

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.


On Sun, Mar 17, 2013 at 03:46 -0700, John wrote:
> I am using graysky's zsh config files which can be found on his github: https://github.com/graysky2/configs/tree/master/shell
> When I try to scp wildcards from remote servers, I get errors:
> % scp facade@gogo:~/*.xz .
> zsh: no matches found: facade@gogo:~/*.xz
> But if I do it without wildcards, no problems ...why :)
> % scp facade@gogo:~/webcam.tar.xz .
> webcam.tar.xz                                                                                 100%  928KB 464.1KB/s   00:02    

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