Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: X font completion is buggy
- X-seq: zsh-workers 35892
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: X font completion is buggy
- Date: Sat, 25 Jul 2015 00:50:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1437778220; bh=gmuk6kMLXho6SPl7j3gEOiKbUf7QUQO2/91/BGGFCZU=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=RWSfdV7ecNPsoVqxvvxfrGm/ZyVKtu1J7qZKuQlQz7FqhYkCAyXZGQrgSGNIIZqCAwm8PVzqAGO0bboUgrZbDJLg/j4lEbi1+1w1FQ+iOTLF0b6HjQ1h1qwsLpNmzjPvj4fYX1gPtXyD+Wgp2hmI0eFmvimVImJ1o3feSEF8viadjZ9ob99dXlb2RyiHNAcn6TIHkMaCj8+BuhzqSy2wTUjlTwTQMxTJxBh9XoVkoK0I0MLeSBbGuLJJuUwbh+kElW7KIX63pQQTs2rGtBRv3avcJqetGvIx7glNCRg8ewuCsq4Mp/76pZStAzRKyE2S1iD4OfJwtWhQ/G2CdT1QDQ==
- In-reply-to: <20150724214952.GA15359@zira.vinc17.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150724214952.GA15359@zira.vinc17.org>
Vincent Lefevre wrote:
>
> zira:~> xterm -fn fixed--
Trying to fix this without understanding what _x_font is doing would lead me
to the following patch.
But this will still result in stuff like:
Warning: Cannot convert string "-adobe-courier-bold-o-normal--" to type FontStruct
Anyone know what might be special about two dashes or was it just an
attempt to reduce the number of matches?. It is also passing -S ''
to compadd which backs up that theory: it only makes sense with the
incomplete fonts. The line is little changed since it was added in 7480
(Aug 1999).
These days, xft fonts tend to be more useful so you might instead want to try
the -fa option to xterm. e.g: xterm -fa Inconsolata
Oliver
diff --git a/Completion/X/Type/_x_font b/Completion/X/Type/_x_font
index a363b27..368b6a6 100644
--- a/Completion/X/Type/_x_font
+++ b/Completion/X/Type/_x_font
@@ -9,7 +9,7 @@ _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 \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author