Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: X font completion is buggy



On 2015-07-24 16:07:37 -0700, Bart Schaefer wrote:
> Try this patch, although I'm not sure why _font_cache is trimming out
> a bunch of size and character set variations in the first place:
> 
> diff --git a/Completion/X/Type/_x_font b/Completion/X/Type/_x_font
> index a363b27..d4da6c8 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 2> /dev/null)}/%--*/--}" )
>  fi
>  
>  _wanted fonts expl font \

This doesn't work: with another font, I end up with:

zira:~> xterm -fn -adobe-helvetica-bold-r-normal--

with no longer any completion possibility, while the fonts are:

-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-15
-adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-2

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - 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)



Messages sorted by: Reverse Date, Date, Thread, Author