From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16680 invoked from network); 22 Feb 2001 12:02:33 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Feb 2001 12:02:33 -0000 Received: (qmail 24409 invoked by alias); 22 Feb 2001 12:02:28 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13519 Received: (qmail 24396 invoked from network); 22 Feb 2001 12:02:27 -0000 Date: Thu, 22 Feb 2001 13:02:22 +0100 (MET) Message-Id: <200102221202.NAA18489@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: Peter Stephenson's message of Thu, 22 Feb 2001 11:49:15 +0000 Subject: Re: Completion services + xterm auto-margin revisited Peter Stephenson wrote: > I just updated the zsh guide at http://sunsite.dk/zsh/Guide/ thanks to some > suggestions from Sven. One of the new things that went in is some mention > of `services': > > compdef mycmd=cmd > > where completion for mycmd is supposed to behave as closely as possible to > that for cmd. > > If I've got this right, this depends on the completion in question > implementing any command-specific behaviour using the parameter $service. > That would imply it's a good idea to alter some of the standard completions > to use $service instead of $words[1]. This was prompted in particular by > looking at _vars_eq --- if you do `compdef myexport=export', you probably > want export arguments, not typeset ones. I changed several of them at that time -- and that means it is quite possible that I overlooked some (or at that time falsely thought that those places shouldn't be changed). > Is this correct? It seems to work correctly in this case, and it's > probably an easy set of changes but I thought I'd better ask. Yes, that looks like one of the places, indeed. Or maybe it was changed to use _arguments after I first proposed the services-patch and then I forgot to change it. I think I should go through all places still using $words[1] again at the weekend. Hooray. > By the way, completion listing for `typeset -' seems to tickle a relative > of an ancient bug with xterm auto-margin: one of the possible descriptions > is exactly 80 characters, but doesn't cause wraparound since there's > nothing to follow, and redisplaying the command line happens one line too > high. There was a sizeable discussion about this once, but I've forgotten > the punchline. The new element here is that it only happens if the screen > needs scrolling --- if the cursor is at the top of the screen, it works > fine. We came to the conclusion that this has to be handled `globally', not only for completion lists. Someone said he would have a look and I promised to merge the things he would come up with with the completion listing code. Then we never heard about it again. Maybe for now we should just make the description shorter? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de