From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12138 invoked from network); 2 May 2000 11:52:35 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 May 2000 11:52:35 -0000 Received: (qmail 29861 invoked by alias); 2 May 2000 11:51:54 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11065 Received: (qmail 29842 invoked from network); 2 May 2000 11:51:54 -0000 Message-ID: <390EC0E9.54E0FA69@u.genie.co.uk> Date: Tue, 02 May 2000 12:50:01 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: Zsh workers Subject: PATCH: _complete_debug and Re: Completion troubles Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On May 1, 5:45pm, Bart Schaefer wrote: > > I get an error message about ~/.nedit not being found. I don't have > to have a .nedit to run nedit, do I? No, I should have thought of that when I reworked _nedit with _arguments before submitting it. Thanks for sorting that out. > I have a suspicion that you're getting the wrong version of _nedit > somehow, but I can't be sure. Oops, that was the problem, sorry. I'll have to add a directory to the end of my fpath for writing new functions. > Use _complete_debug, ^X?, and examine the trace file. I actually, have nedit aliased to /usr/local/bin/nc and _complete_debug had a few problems creating a trace file with lots of slashes in its name. Small fix follows. Once fixed, that was useful, thanks. With the print -zR line in _complete_debug, why is $VISUAL and $EDITOR used? Why would anyone want to edit the trace file? Surely it would be better to just use ${PAGER:-more} by default and use a style for anyone who wants greater control and for warped people who like to use vi as their pager as well as their editor. > } The other thing is the _expand completer now seems to be expanding > } everything after a tilde which is annoying. > > Hmm, that doesn't happen to me; I get this sort of thing: You get what I would expect. Try setting the glob style to a true value. It is done on line 54 of _expand. I tried running dev-22 to see what has changed. It seems that in dev-22 _expand was only passed the '+' whereas now, it also gets '~' so it is expanding to whatever ~+ is. In a way, this makes more sense. > That one also works for me. I think you must have the `substitute' style > set to a true value. However, we can fix the problem with the closing > brace; that happens because a missing close-brace is a parse error that You're right about substitute being true as being significant. I'm not sure that your fix has worked enitiely though - I get an error message about the closing brace being expected. What do you get if you do: exp='${foo' echo $(print -lR - ${(e)exp} 2>/dev/null) Oliver --- Completion/Commands/_complete_debug Sun Apr 30 11:04:29 2000 +++ Completion/Commands/_complete_debug Tue May 2 10:51:55 2000 @@ -4,7 +4,7 @@ unsetopt markdirs globsubst shwordsplit nounset ksharrays (( $+_debug_count )) || integer -g _debug_count -local tmp=${TMPPREFIX}${$}${words[1]}$[++_debug_count] +local tmp=${TMPPREFIX}${$}${words[1]:t}$[++_debug_count] local w="${(qqq)words}" [[ -t 2 ]] && exec 3>&2 2>| $tmp