Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
avoid errors on expansion failure
- X-seq: zsh-users 18906
- From: Eric Smith <es@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: avoid errors on expansion failure
- Date: Fri, 13 Jun 2014 10:44:38 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
I wanted to scp recent files of certain types and the command failed if there
were no expansions that met the conditions like this;
[eric@bigmac ~] $ scp p:'*.{pptx,ppt,docx,doc,xlsx,xls,pdf,html,txt}(m-30)' .
zsh:1: no matches found: *.ppt(m-30)
[eric@bigmac ~] $ scp p:'*.{pptx,docx,doc,xlsx,xls,pdf,html,txt}(m-30)' .
zsh:1: no matches found: *.xls(m-30)
[eric@bigmac ~] $ scp p:'*.{pptx,docx,doc,xlsx,pdf,html,txt}(m-30)' .
zsh:1: no matches found: *.html(m-30)
[eric@bigmac ~] $ scp p:'*.{pptx,docx,doc,xlsx,pdf,txt}(m-30)' .
foobar.pptx 100% 348KB 347.5KB/s 00:00
How do I make the command ignore this and to run first time?
--
Eric Smith
Messages sorted by:
Reverse Date,
Date,
Thread,
Author