From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28476 invoked by alias); 12 Sep 2016 23:31:21 -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: 21883 Received: (qmail 26688 invoked from network); 12 Sep 2016 23:31:21 -0000 X-Qmail-Scanner-Diagnostics: from out4-smtp.messagingengine.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(66.111.4.28):SA:0(0.0/5.0):. Processed in 0.116199 secs); 12 Sep 2016 23:31:21 -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=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=/zb+QfBLBRo1gUzL1GpqZT/UYLU=; b=g8UL8v X/lOblbd0/zbMKULviwbiqv4Jjy1KFnjgunhrmW7MGaWCKq/H7NA7bbqoyXMftd+ 6xnH243iqq8wRf+VwIhPnyuPm9KT3zSMAd4JKgCLPprW21UqSNxBM7yLgDM55gA0 KoV0qHuD+GMh75pHmHuYiBvCIyLbRfgN1EtQY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=/zb+QfBLBRo1gUzL1GpqZT/UYLU=; b=uzSvG r/uiZQcvEMm30g89/zAidaOmqQ3OBE4m6Jm6odJEoiIOB0lfRS3WIEdKh1SQLuTz rTLZ7I1cnkMzTmVMdkzQdhsI+YxXYyMc+z7+OmekpalIW8vduF1WZQcflp6gvSkV JGsyuZLrAfIde7Kv6hHVCyrneaMrsvuLWNVBtQ= X-Sasl-enc: eLSx9P6JEmvaoeqXeFUUUzqZ5hFKlK0jTIfrF9LAb+sj 1473723078 Date: Mon, 12 Sep 2016 23:30:28 +0000 From: Daniel Shahaf To: zsh-users@zsh.org Subject: Setting the 'completer' =?utf-8?Q?style_?= =?utf-8?B?4oCU?= _match and ** Message-ID: <20160912233028.GA17257@fujitsu.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.23 (2014-03-12) I'm trying to configure my zshrc such that: 1. The following — . % mkdir -p html/generic.5.html man/man5/generic.5 % : **/generic.* . — offers both directories. 2. The following — . % mkdir nntp-gmane % service *ntp* . — offers "openntpd" but not "nntp-gmane". I've come up with the following: . bindkey $'\t' complete-word zstyle ':completion:*' completer _all_matches _match-ds _expand _complete _ignored _match-ds() { [[ $PREFIX$SUFFIX != *[*][*]* ]] && _match "$@" } . The idea is that if a pattern contains "**" then _match('s wrapper) will leave it for _expand to process. Is there another way to implement this? Cheers, Daniel