From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2703 invoked by alias); 5 Feb 2013 09:19:17 -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: 31027 Received: (qmail 13869 invoked from network); 5 Feb 2013 09:19:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Tue, 5 Feb 2013 17:08:54 +0800 From: Han Pingtian To: zsh-workers@zsh.org Subject: [PATCH] removing all '-g' from glob in _files Message-ID: <20130205090854.GA16389@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13020509-5518-0000-0000-00000B48275D Looks like we should remove all '-g' options from "glob" in _files. With the old _files, we have this result: % ls a.c a.h a.sh % compdef '_files -g "*.h" -g "*.c" -g "*.sh"' foo % foo # only completes "a.h" With the new _files, the will completes all three files here. --- Completion/Unix/Type/_files | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index 0a27158..0f6fcd6 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -8,7 +8,7 @@ zparseopts -a opts \ type="${(@j::M)${(@)tmp#-}#?}" if (( $tmp[(I)-g*] )); then - glob="${${${${(@M)tmp:#-g*}#-g}##[[:blank:]]#}%%[[:blank:]]#}" + glob="${${${(@)${(@M)tmp:#-g*}#-g}##[[:blank:]]#}%%[[:blank:]]#}" [[ "$glob" = *[^\\][[:blank:]]* ]] && glob="{${glob//(#b)([^\\])[[:blank:]]##/${match[1]},}}" -- 1.7.7.6