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

Re: X font completion is buggy



Bart wrote:
> 
> Also this predates menu-selection so insanely long completion listings
> were more of a problem.
> 
> I think we could safely do away with that filter.

That's perhaps best. Vincent's follow-up indicates that no filtering
would match his expectations.

There's ways this could be improved if old style X fonts were something
worth caring about: separating out aliases, indications of what
component you're on, handling * wildcards.

Oliver

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



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