* Re: problem with zsh and wildcards in scp commands
@ 2013-03-17 16:03 John
2013-03-17 16:20 ` Jérémie Roquet
0 siblings, 1 reply; 9+ messages in thread
From: John @ 2013-03-17 16:03 UTC (permalink / raw)
To: zsh-users
Thank you. Can zsh be modified easily in a config file to behave as bash with scp?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem with zsh and wildcards in scp commands
2013-03-17 16:03 problem with zsh and wildcards in scp commands John
@ 2013-03-17 16:20 ` Jérémie Roquet
2013-03-17 16:24 ` John
0 siblings, 1 reply; 9+ messages in thread
From: Jérémie Roquet @ 2013-03-17 16:20 UTC (permalink / raw)
To: John; +Cc: zsh-users
Hi,
2013/3/17 John <da_audiophile@yahoo.com>:
> Thank you. Can zsh be modified easily in a config file to behave as bash with scp?
unsetopt nomatch
I wouldn't advice to use this, however, as it still wouldn't do what
you expect it to do if the expansion is possible locally.
You should rather use something like “noglob scp facade@gogo:~/*.xz
.”, which prevents local expansion.
Best regards,
--
Jérémie
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem with zsh and wildcards in scp commands
2013-03-17 16:20 ` Jérémie Roquet
@ 2013-03-17 16:24 ` John
2013-03-17 16:31 ` Jérémie Roquet
0 siblings, 1 reply; 9+ messages in thread
From: John @ 2013-03-17 16:24 UTC (permalink / raw)
To: Jérémie Roquet; +Cc: zsh-users
Thank you. Perhaps an alias ?
alias scp='noglob scp'
----- Original Message -----
> From: Jérémie Roquet <arkanosis@gmail.com>
> To: John <da_audiophile@yahoo.com>
> Cc: "zsh-users@zsh.org" <zsh-users@zsh.org>
> Sent: Sunday, March 17, 2013 12:20 PM
> Subject: Re: problem with zsh and wildcards in scp commands
>
> Hi,
>
> 2013/3/17 John <da_audiophile@yahoo.com>:
>> Thank you. Can zsh be modified easily in a config file to behave as bash
> with scp?
>
> unsetopt nomatch
>
> I wouldn't advice to use this, however, as it still wouldn't do what
> you expect it to do if the expansion is possible locally.
>
> You should rather use something like “noglob scp facade@gogo:~/*.xz
> .”, which prevents local expansion.
>
> Best regards,
>
> --
> Jérémie
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem with zsh and wildcards in scp commands
2013-03-17 16:24 ` John
@ 2013-03-17 16:31 ` Jérémie Roquet
2013-03-17 16:55 ` Valodim Skywalker
0 siblings, 1 reply; 9+ messages in thread
From: Jérémie Roquet @ 2013-03-17 16:31 UTC (permalink / raw)
To: John; +Cc: zsh-users
2013/3/17 John <da_audiophile@yahoo.com>:
> Thank you. Perhaps an alias ?
>
> alias scp='noglob scp'
Keep in mind that it prevents local expansion for the whole line, so,
with this alias, you wouldn't be able to do things like “scp ./*.xz
facade@gogo:~/” anymore.
Best regards,
--
Jérémie
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem with zsh and wildcards in scp commands
@ 2013-03-17 19:21 John
0 siblings, 0 replies; 9+ messages in thread
From: John @ 2013-03-17 19:21 UTC (permalink / raw)
To: zsh-users
Thanks to everyone who replied to my thread.
^ permalink raw reply [flat|nested] 9+ messages in thread
* problem with zsh and wildcards in scp commands
@ 2013-03-17 10:46 John
2013-03-17 12:33 ` Eike von Seggern
0 siblings, 1 reply; 9+ messages in thread
From: John @ 2013-03-17 10:46 UTC (permalink / raw)
To: zsh-users
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: problem with zsh and wildcards in scp commands
2013-03-17 10:46 John
@ 2013-03-17 12:33 ` Eike von Seggern
2013-03-18 13:47 ` Vincent Lefevre
0 siblings, 1 reply; 9+ messages in thread
From: Eike von Seggern @ 2013-03-17 12:33 UTC (permalink / raw)
To: zsh-users
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.
Best
Eike
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-03-18 13:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-17 16:03 problem with zsh and wildcards in scp commands 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
-- strict thread matches above, loose matches on Subject: below --
2013-03-17 19:21 John
2013-03-17 10:46 John
2013-03-17 12:33 ` Eike von Seggern
2013-03-18 13:47 ` Vincent Lefevre
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).