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

PATCH: Re: Completion list question



[ moved to -workers ]

Bart Schaefer wrote:

> ...
> 
> It's probably a bug (Sven?) that it's not possible to use menu selection
> without getting color listings as well.

Oops, yes it is.  Hm, and that from me who once thought I'd never use
coloured listing.  (Nowadays I'm even using menu selection for some
contexts -- what are we coming to...)

This fixes it for me.

Bye
 Sven

Index: Completion/Core/_main_complete
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v
retrieving revision 1.45
diff -u -r1.45 _main_complete
--- Completion/Core/_main_complete	2001/03/06 07:47:27	1.45
+++ Completion/Core/_main_complete	2001/03/26 09:11:19
@@ -302,8 +302,10 @@
 
 if [[ "$compstate[old_list]" = keep ]]; then
   ZLS_COLORS="$_saved_colors"
-else
+elif (( $#_comp_colors )); then
   ZLS_COLORS="${(j.:.)_comp_colors}"
+else
+  unset ZLS_COLORS
 fi
 
 # Now call the post-functions.
Index: Completion/Core/_setup
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Core/_setup,v
retrieving revision 1.7
diff -u -r1.7 _setup
--- Completion/Core/_setup	2000/06/28 13:59:21	1.7
+++ Completion/Core/_setup	2001/03/26 09:11:20
@@ -20,7 +20,7 @@
 #   ZLS_COLORS="$ZLS_COLORS$ZLS_COLOURS"
 
 elif [[ "$1" = default ]]; then
-  ZLS_COLORS=
+  unset ZLS_COLORS
 fi
 
 if zstyle -t ":completion:${curcontext}:$1" list-packed; then

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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