From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ca5b2d80 for ; Mon, 16 Dec 2019 23:19:09 +0000 (UTC) Received: (qmail 26850 invoked by alias); 16 Dec 2019 23:19:01 -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: List-Unsubscribe: X-Seq: 24559 Received: (qmail 1644 invoked by uid 1010); 16 Dec 2019 23:19:00 -0000 X-Qmail-Scanner-Diagnostics: from mail-yb1-f173.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25663. spamassassin: 3.4.2. Clear:RC:0(209.85.219.173):SA:0(-1.9/5.0):. Processed in 2.212635 secs); 16 Dec 2019 23:19:00 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.219.173 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=G1V8r07aCFRag0XDUPxnZ2atVZJaro3Y40DVb7/3+Jc=; b=HZ/aQAuhUccm/kd4pED97HlUu9EP3k9jip00/eABSfphR8hNsEWei/65D7H8e+bfVJ 29+wbZO8qyvxS2MJrQ6O/mehhZUqxa/TGt1S55O9Z0mnlLrYDNtYSpTCt5fbEkqkZQlN qRu1lb/8FXnxBFnPjHKitIFNnIgCNvksJcmfU5IjfB6/YpikVwjdhI3JJ2eEJTAuXyGx BfmXynZlgGY2wy7a86kM9oZ0bx7+q/TOp4ttxJpN42FMMpBlSbmu0wGysat0g+mPtl8+ vgK2l2bqj/fYLHZrDmFjBwF5m/7DFkgAuFEuuvKcncunuuZpzsWg/I+LkJB88dZWf1dS tMzg== X-Gm-Message-State: APjAAAV5CoFIJg/HyYCAMy/5JUY+h5aU5ONg9oRcoWBXrr8FYCfUDm3Y ItR9w4NYfyIuBSEmpJXgNpIyXyfpuj5EAw== X-Google-Smtp-Source: APXvYqwZwMIE6AV1BuOrvVM29AfiIoAqLWqDyV96QnOqkOwjZZDmRot2BXkObrVl+Q5kFhZTZsCM+w== X-Received: by 2002:a25:7c45:: with SMTP id x66mr20964701ybc.297.1576538305273; Mon, 16 Dec 2019 15:18:25 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Glob and grep From: dana In-Reply-To: <15c62c86-5b55-e248-725f-4ecbfe73822d@goots.org> Date: Mon, 16 Dec 2019 17:18:23 -0600 Cc: Zsh Users Content-Transfer-Encoding: 7bit Message-Id: <18417C9E-0212-4E3C-A301-1BBA35F61051@dana.is> References: <15c62c86-5b55-e248-725f-4ecbfe73822d@goots.org> To: Nick Cross X-Mailer: Apple Mail (2.3445.104.11) On 16 Dec 2019, at 16:44, Nick Cross wrote: > While I found information about ^(xxx) it wasn't clear how to have multiple > expressions to ignore. In addition to Mikael's suggestion you can also use the x~y syntax, which i personally find less confusing, and is effectively `m/x/ && !m/y/` in Perl: **/*.groovy~*/(test|target)/* # or you can chain multiple y patterns **/*.groovy~*/test/*~*/target/* (Note that, like zshexpn(1) says, / and . are not special in the y pattern) On 16 Dec 2019, at 16:44, Nick Cross wrote: > Am I right in thinking I can add (.) to e.g. *.groovy to ensure I only > search for files as well ? Use (-.) if you also want to match symlinks to files (which is common) dana