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

avoid errors on expansion failure



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