From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18298 invoked by alias); 14 Oct 2017 09:02:54 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 41888 Received: (qmail 28957 invoked by uid 1010); 14 Oct 2017 09:02:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.128.172):SA:0(-4.7/5.0):. Processed in 1.194015 secs); 14 Oct 2017 09:02:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=kzZ6dDj0XzmiXHYxvhFLVw2cGJTNJ6iGGV7vf2OMpbQ=; b=Qj/fVXaKmLpAijVPxBa0SI0VwOTFhQA9EJPAFL9LPMyGCWpa8t5tldYeyH4XEKujcb /Iv8BY+g5fGOrjNLwYmh0DdOEWGmu9Qxnnap2pD4nRxTB6Ta+R7w+e7EJ7OjPEMCM3Kg 6nJA9gC8ZCTzsVXpvbaFdhjyjCBp63dITHiwuOJDymo1LCJ451hQ3Xt5ddb6tZVF7rhu rhQvBVGQxuiALITTLvNi9jhpMr/WQe+OImRjRT2IWT3JQFBWMbyNQgooZVpVNITzeObb +2kp7fKyKHU/FO9/5cR7Iw4ZbREb/ttbOGrtDicJ/CQA2xE86avIsFFuDRgED0jbaV9T NxxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :mime-version:content-disposition:user-agent; bh=kzZ6dDj0XzmiXHYxvhFLVw2cGJTNJ6iGGV7vf2OMpbQ=; b=ppj/sON3PFrzoz82jEoPW90ydG/bb9VaSZrUl6rmbXF0wdnxA2NmPo4VdzNnkT/sCr 08frl83fk2vaf1+IZQC6IlOU5LaUlM+E0FXRh6wTxHQsqTHx9OgzrwGCe0RM2/cu+LVN DvtbvtNSgBJcz2oJbtKnU6FfkFCIHCZ1FYi6bGsIyP67scH8lSxffQlWu9czTS2dSaNA QbaDL2qQwArkFDEP5LaPdwEhx+wp11Gx0R/l2ZR0l/wRvii2DUKxhobpUJ/8VGItcCo6 /B/9y+DfcO4mJrL1/0Dr1gl2pr6GwGHnKgXDUPjWK1X3Q+2k0eQJpOaeNqu7dUiivGIx ogOg== X-Gm-Message-State: AMCzsaVuIBBGQWTG3l7qcma6GT/LKGf0YGf5Uo8FWUbFdauILqUM9TxB v+M9vqtJE3W163t004a0wuVlng== X-Google-Smtp-Source: AOwi7QDOxUlN0USizYsFBmNS7nTcMfolx9RuW6x0CDrW5t7THmbMPxh34NK6aH7Ffc5dlTJrftykoQ== X-Received: by 10.223.135.3 with SMTP id a3mr3287770wra.109.1507971766966; Sat, 14 Oct 2017 02:02:46 -0700 (PDT) Date: Sat, 14 Oct 2017 10:02:44 +0100 From: Stephane Chazelas To: Zsh hackers list Subject: feature request: (pat1&pat2) glob and @(pat1&pat2) kshglob Message-ID: <20171014090243.GA5249@chaz.gmail.com> Mail-Followup-To: Zsh hackers list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Hi, ksh93 has a @(pat1&pat2) glob operator. Useful (though not often I have to admit) for things like: @(????&*a*) for 4-char file names that contain a "a". It can currently be emulated with extendedglob: ????~^*a* or ^(^????|^*a*) (or !(!(????)|!(*a*)) kshglob equivalent) but those are less obvious and require extendedglob. Since (pat1&pat2) is currently a syntax error and & is not a glob qualifier, it would be safe to add it even outside extendedglob like for (pat1|pat2). Like for (pat1|pat2), we'd want to have *(foo&bar) not be treated as a glob qualifier. Adding a @(pat1&pat2) kshglob would improve compatibility with ksh93 in ksh emulation. -- Stephane