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

Re: How to change order of completions?



On Wednesday, April 3, 2013 3:35:45 PM, Bart Schaefer wrote:
> 
> schaefer<513> vi
> tags in context :completion::complete:vi::
>      tex-files  (_files _default (eval))
>      src-files  (_files _default (eval))
>      all-files  (_files _default (eval))

Shouldn't we filter the (eval) out of that?  This seems to be a case of
_complete_help (specifically _help_sort_tags) not keeping up with a
change to the contents of $funcstack.


Index: Completion/Base/Widget/_complete_help
===================================================================
--- Completion/Base/Widget/_complete_help       26 Nov 2007 17:38:13 -0000
+++ Completion/Base/Widget/_complete_help       4 Apr 2013 15:19:45 -0000
@@ -73,7 +73,7 @@
 }
 
 _help_sort_tags() {
-  local f="${${(@)${(@)funcstack[3,(i)_(main_complete|complete|approximate|normal)]}:#_(dispatch|wanted|requested|all_labels|next_label)}% *}"
+  local f="${${(@)${(@)funcstack[3,(i)_(main_complete|complete|approximate|normal)]}:#(_(dispatch|wanted|requested|all_labels|next_label)|\(eval\))}% *}"
 
   if [[ "$help_funcs[$curcontext]" != *${f}* ||
         "$help_tags[${curcontext}${f}]" != *(${(j:|:)~argv})* ]]; then

(Someone will need to commit that for me until I have git fully set up.)



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