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

Re: X font completion is buggy



On Jul 24, 11:49pm, Vincent Lefevre wrote:
}
} zira:~> xterm -fn fix[TAB]
} 
} is completed to:
} 
} zira:~> xterm -fn fixed--
} 
} zira:~> xlsfonts | grep '^fix'
} fixed
} fixed
} 
} So, it should have been "fixed".

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 \



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