From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8926 invoked from network); 9 Sep 1999 08:50:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Sep 1999 08:50:20 -0000 Received: (qmail 15931 invoked by alias); 9 Sep 1999 08:50:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7735 Received: (qmail 15922 invoked from network); 9 Sep 1999 08:50:04 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: _cvs References: <199909090823.KAA02107@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 09 Sep 1999 17:50:01 +0900 In-Reply-To: Sven Wischnowsky's message of "Thu, 9 Sep 1999 10:23:53 +0200 (MET DST)" Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article <199909090823.KAA02107@beta.informatik.hu-berlin.de>, Sven Wischnowsky writes: > The patch below is a bit of a hack: it tests if there is only one > string in the display list and if so, it makes this string be > displayed as if it had a newline -- so that the other groups are > separately put into columns. Hm. > Again, yes, it was. Since display lists are so special with respect to > listing, the `-y' enforces the opening of a new group, treated > completely differently and *not* with the name given with `-[JV]' in > the same call to `comp{ctl,add,gen}'. I see. > The patch below at least makes the explanation string be added to the > group named by a `-[JV]' option, if any. But you still get different > groups, i.e. the output now looks like: > > option > abc def > mno pqr Z(2):akr@is27e1u11% Src/zsh -f is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst is27e1u11% _tst () { compadd -J option -X option -y '(mno pqr)' ghi jkl; compadd -J option -X option abc def } is27e1u11% tst mno pqr option abc def This test case excahnges the order of two `compadd'. I think it's not intentional. Also, I modified _apt_arguments not to use -y if it is un unnecessary. Index: Completion/Debian/_apt_arguments =================================================================== RCS file: /projects/zsh/zsh/Completion/Debian/_apt_arguments,v retrieving revision 1.1.1.2 diff -u -F^( -r1.1.1.2 _apt_arguments --- _apt_arguments 1999/09/08 21:05:57 1.1.1.2 +++ _apt_arguments 1999/09/09 08:42:52 @@ -73,8 +73,12 @@ 'if [[ $PREFIX = -'"$short_seq"' ]]; then apt_consume_short ${PREFIX[2,-1]} tmp1=(${${(M)${(s:,:)${(kj:,:)options[(R)*~0]}}:#-?}#-}) - tmp2=(-${^tmp1}) - compadd "$expl_opt[@]" -y "($tmp2)" - ${PREFIX}${^tmp1} + if [[ $PREFIX = - ]]; then + compadd "$expl_opt[@]" - -${^tmp1} + else + tmp2=(-${^tmp1}) + compadd "$expl_opt[@]" -y "($tmp2)" - ${PREFIX}${^tmp1} + fi elif [[ -z "$PREFIX" ]]; then compadd "$expl_opt[@]" - ${(M)${(s:,:)${(kj:,:)options[(R)*~0]}}:#-?} fi' -- Tanaka Akira