From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8041 invoked by alias); 13 Jul 2015 05:45:32 -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: X-Seq: 35782 Received: (qmail 5441 invoked from network); 13 Jul 2015 05:45:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=CTcqLZ9LUK06xOM1InHzHWxNu9lPsIlbep3FpYs9eU8=; b=i37liKg6nUinRsfShnxiwP2l35vLe+BzG+StYZcm+7osMuYjWNYiH97uHLXvF/EXwh D7Xl2+bKNd5u1Ad2voQj/CPRapT3LRkBUlpHmz6R2pAuh2hcUuMDjFF17ePQYsAB73ZG 5Y0PTzUCZNm6a0JnD6D9W30BdH8ZpnWzuteAacsmje89iAgGvq1E8d21IwWfn9oOnQNo FDZBKSrQ68k0Z31LzGxDjkVgqdrpm0/K8+Z/OS0WuXmKSMLPORMtR/vBQ3Vh8vEWm8tz 70sVEhAnuMC1sOSJp3Ufxv2F8q6uzBai8gjACCoykLhkzwifbqGNZoVcaCg2NO7ljrcP Q9+A== X-Gm-Message-State: ALoCoQlqO47X5dXHe+7TsFaLegs1Y8/Cnaipuwu9iQSCIyPScA320Vi4oVOUq8b7Mtf53aJ8UtQf X-Received: by 10.60.45.104 with SMTP id l8mr30707466oem.61.1436766326974; Sun, 12 Jul 2015 22:45:26 -0700 (PDT) From: Bart Schaefer Message-Id: <150712224441.ZM5970@torch.brasslantern.com> Date: Sun, 12 Jul 2015 22:44:41 -0700 In-Reply-To: <4417.1436657149@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: PATCH: completion of dates" (Jul 12, 1:25am) References: <11523.1436283148@thecus.kiddle.eu> <27798.1436519486@thecus.kiddle.eu> <150710163754.ZM10437@torch.brasslantern.com> <4417.1436657149@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh workers Subject: Re: PATCH: completion of dates MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 12, 1:25am, Oliver Kiddle wrote: } } I think I've finally guessed what the likely cause is: a file-patterns } style. _globquals then gets called for each of the file patterns that is } completed together. That is a bug in _files/_path_files. } } I think the solution is to move the glob qualifier handling from the } beginning of _path_files to the beginning of _files. It can then be } done before the file-patterns are processed and so done once only. The } disadvantage is that glob qualifier completion wouldn't then work with } _path_files. However, _path_files is typically used instead of _files in } the type of situations where glob qualifiers aren't applicable. Hmm, I'm not sure that last is really true. About two-thirds of the uses are either (1) to pass the -/ option, which _files accepts but converts into a pattern because it uses it to split into the "directories" tag, and (2) to pass the -g option for much the same reason. Glob qualifiers for the file type don't apply in those cases, but qualifiers like (F) or (l+0) might apply. Are there a lot of cases where _path_files could be replaced by _files? That'd introduce file-patterns and ignore handling in a bunch of places where it doesn't happen now, among other things such as e.g. allowing _next_tags to advance from directories to all-files. Maybe the way to go is to handle glob qualifiers in BOTH places, and not call down into _path_files from _files while "inside" the quals?