From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21138 invoked by alias); 27 Jul 2011 14:01:26 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16144 Received: (qmail 6080 invoked from network); 27 Jul 2011 14:01:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.28 as permitted sender) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:date; s=smtpout; bh=hE25yr/X1UPZE5FthGAZRB+NQe4=; b=mbwVaKaAqVefwefWxesKCmH58vst 5VR4MygMWlhtfjAdmDJSGRDzaMJM2uc+qPXCXWivp50NPWyk6S35l8Z1ztyodW/b 2vEFISfB8x27m1TPMj0ErIgBSWSi11orMR/ZVpgGWLOgNp0C+hXjdOGUpUQtZ03A YvHW/JlIaNcMUy0= Message-Id: <1311774830.29469.2156456149@webmail.messagingengine.com> X-Sasl-Enc: 7Btu4tBWaH+XVW7GTiRTUX0u2Of9+TjBjvnAHQB9VXfg 1311774830 From: "Ronald Fischer" To: zsh-users@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" X-Mailer: MessagingEngine.com Webmail Interface Subject: Why does this extended glob pattern fail? Date: Wed, 27 Jul 2011 15:53:50 +0200 In my zsh script, I want to copy all files from a directory, except files ending in .log and .png. This is my code: .... setopt extendedglob # makes ^ work in glob pattern cp ^$from/*.{log,png} $dest .... However, there are cases when $from has neither .log nor .png files; but it DOES contain other files. In this case I get the error message no matches found: ^/home/...../*.log I think this has to do with the timing of when interpretation of {....} and when globbing is done. Why exactly do I get the error message, and how do I code this correctly? Im using zsh 4.2. Ronald -- Ronald Fischer + If a packet hits a pocket on a socket on a port, + and the bus is interrupted and the interrupt's not caught, + then the socket packet pocket has an error to report. + (cited after Peter van der Linden)