zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: Re: X font completion is buggy
Date: Sun, 26 Jul 2015 23:10:49 +0200	[thread overview]
Message-ID: <20150726211049.GF11938@zira.vinc17.org> (raw)
In-Reply-To: <12308.1437813031@thecus.kiddle.eu>

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 <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


  reply	other threads:[~2015-07-26 21:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 21:49 Vincent Lefevre
2015-07-24 22:50 ` Oliver Kiddle
2015-07-24 23:31   ` Bart Schaefer
2015-07-25  8:30     ` Oliver Kiddle
2015-07-26 21:10       ` Vincent Lefevre [this message]
2015-07-26 21:41         ` Bart Schaefer
2015-07-26 22:29           ` Mikael Magnusson
2015-07-26 23:01           ` Vincent Lefevre
2015-07-27  3:19             ` Bart Schaefer
2015-07-27  5:11               ` Mikael Magnusson
2015-07-27 15:40                 ` Bart Schaefer
2015-07-25  1:28   ` Vincent Lefevre
2015-07-24 23:07 ` Bart Schaefer
2015-07-25  0:47   ` Vincent Lefevre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150726211049.GF11938@zira.vinc17.org \
    --to=vincent@vinc17.net \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).