From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15987 invoked by alias); 26 Jul 2015 21:10:58 -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: 35920 Received: (qmail 22956 invoked from network); 26 Jul 2015 21:10:55 -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=-0.3 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT autolearn=no autolearn_force=no version=3.4.0 Date: Sun, 26 Jul 2015 23:10:49 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: X font completion is buggy Message-ID: <20150726211049.GF11938@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20150724214952.GA15359@zira.vinc17.org> <10638.1437778219@thecus.kiddle.eu> <150724163126.ZM20996@torch.brasslantern.com> <12308.1437813031@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <12308.1437813031@thecus.kiddle.eu> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6472-vl-r76280 (2015-07-24) On 2015-07-25 10:30:31 +0200, Oliver Kiddle wrote: > diff --git a/Completion/X/Type/_x_font b/Completion/X/Type/_x_font > index a363b27..1202d82 100644 > --- a/Completion/X/Type/_x_font > +++ b/Completion/X/Type/_x_font > @@ -9,8 +9,8 @@ _tags fonts || return 1 > if (( ! $+_font_cache )); then > typeset -gU _font_cache > > - _font_cache=( "${(@)^${(@f)$(_call_program fonts xlsfonts 2> /dev/null)}%%--*}--" ) > + _font_cache=( ${(f)"$(_call_program fonts xlsfonts)"} ) > fi > > _wanted fonts expl font \ > - compadd -M 'r:|-=* r:|=*' "$@" -S '' -a - _font_cache > + compadd -M 'r:|-=* r:|=*' "$@" -a - _font_cache It behaves in a strange way: $ xterm -fn -ad[TAB] gives: $ xterm -fn -adobe-[] Then h[TAB] gives: $ xterm -fn -adobe-helvetica-[]--n--0-0-0-0-p-0-iso8859 Another [TAB] gives: $ xterm -fn -adobe-helvetica-[]--n--0-0-0-0-p-0-iso8859- Another [TAB] gives the list: Completing font -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-medium-i-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-medium-i-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-medium-i-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-medium-o-narrow--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-medium-o-narrow--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-medium-o-narrow--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-medium-o-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-medium-r-normal--0-0-0-0-p-0-iso8859-15 Now, b[TAB] gives: $ xterm -fn -adobe-helvetica-bold--n--0-0-0-0-p-0-iso8859-[] but the cursor shouldn't be at the end because after "bold-", there should be i, o or r. If I type [TAB], I get: $ xterm -fn -adobe-helvetica-bold--n--0-0-0-0-p-0-iso8859-[] Completing font -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-15 -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1 -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-2 -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-15 I can type "1" and cycle, but I would expect the cursor after "bold-". -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)