From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21074 invoked from network); 5 Apr 2000 10:48:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Apr 2000 10:48:50 -0000 Received: (qmail 1467 invoked by alias); 5 Apr 2000 10:48:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10507 Received: (qmail 1442 invoked from network); 5 Apr 2000 10:48:12 -0000 Date: Wed, 5 Apr 2000 12:48:10 +0200 (MET DST) Message-Id: <200004051048.MAA02650@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Wed, 05 Apr 2000 11:16:55 +0100 Subject: PATCH: Re: Selection won't start Peter Stephenson wrote: > Running zsh -f and loading completion, then using these styles: > > zstyle ':completion:*' completer _oldlist _complete _approximate > zstyle ':completion:*' max-errors 2 numeric > zstyle ':completion:*' menu select=5 > > menu selection doesn't come into effect (with AUTOMENU) until I explicitly > set SELECTMIN, after which it seems to be following the value of SELECTMIN, > not the style. I also need to load zsh/complist explicitly as well. It > doesn't seem to be dependent on the order of the initialization (I wouldn't > expect it to be). I can't see offhand how it's supposed to work, so I > don't know if this is just me getting something wrong. I tried with both > filename completion and option completion. I deliberately don't have > list-colors set, but in any case it isn't necessary for SELECTMIN to work. This was all caused by the wrong test in _main_complete. I must have accidentally deleted the `sel' sometime. Dunno. > (I just noticed how incomprehensible to beginners that is. AUTOMENU is an > option, SELECTMIN is a parameter, list-colors is a style, zsh/complist is a > module... I suppose you just have to be here when it's happening.) That's why I made it load complist automatically and so on. One only needs to use the style. There are still some other options that don't have equivalent styles, though. > Also, _zmodload is now failing to remove the `.so' from the ends of > modules. A small thinko in _files. Bye Sven Index: Completion/Core/_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_files,v retrieving revision 1.3 diff -u -r1.3 _files --- Completion/Core/_files 2000/04/03 15:27:14 1.3 +++ Completion/Core/_files 2000/04/05 10:44:48 @@ -6,7 +6,7 @@ '/=tmp' 'f=tmp' 'g+:-=tmp' q n 1 2 P: S: r: R: W: X+: M+: F: J+: V+: type="${(@j::M)${(@)tmp#-}#?}" -(( $tmp[(I)-g*] )) && glob="${(j: :)${(M)tmp:#-g*}#-g}" +(( $tmp[(I)-g*] )) && glob="${(j: :)${(@M)tmp:#-g*}#-g}" ign=$opts[(I)-F] if (( ign )); then ign=( $=opts[ign+1] ) Index: Completion/Core/_main_complete =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Core/_main_complete,v retrieving revision 1.3 diff -u -r1.3 _main_complete --- Completion/Core/_main_complete 2000/04/03 13:13:02 1.3 +++ Completion/Core/_main_complete 2000/04/05 10:44:48 @@ -140,7 +140,7 @@ else sel=( "${(@M)_menu_style:#select*}" ) - if (( $# )); then + if (( $#sel )); then local min=9999999 i num for i in "$sel[@]"; do -- Sven Wischnowsky wischnow@informatik.hu-berlin.de