From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23380 invoked from network); 6 Jul 2001 09:59:09 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jul 2001 09:59:09 -0000 Received: (qmail 8821 invoked by alias); 6 Jul 2001 09:58:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15280 Received: (qmail 8775 invoked from network); 6 Jul 2001 09:58:02 -0000 From: Sven Wischnowsky Date: Fri, 6 Jul 2001 11:56:44 +0200 (MET DST) Message-Id: <200107060956.LAA12775@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: Debugging of dynamocally defined functions In-Reply-To: <000001c10514$04fa4580$21c9ca95@mow.siemens.ru> Andrej Borsenkow wrote: > Trying to debug one problem I had to look at set -x output of compinit. The > last line was compdef:101:... It turned out, there is no way to find correct > place. compdef is itself defined in compinit, and has comments. which > compdef produces source without comments and line numbers do not match. > > Honestly speaking, I never liked it (function defining other functions that > is); why not simply have them autoloaded is beyond me. You were here, you should know. That it's historical -- what now is compinit once was the whole completion system (with so many changes that noone would recognise it, but...). It's just that noone took the time to move compdef into an autoloaded file. About the line numbers: the way I normally do it is to move the cursor to the first line of the function and then use cursor-down with a prefix argument. Ugly, I agree. Hm, could we change it so that it saves the line number of the script or surrounding function? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de