From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19566 invoked from network); 10 Apr 2004 17:44:47 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 10 Apr 2004 17:44:47 -0000 Received: (qmail 12017 invoked by alias); 10 Apr 2004 17:44:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19751 Received: (qmail 11981 invoked from network); 10 Apr 2004 17:44:38 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 10 Apr 2004 17:44:38 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 10 Apr 2004 17:44:37 -0000 Received: (qmail 4006 invoked from network); 10 Apr 2004 17:44:37 -0000 Received: from wbar3.sjo1-4-11-009-147.sjo1.dsl-verizon.net (HELO candle.brasslantern.com) (4.11.9.147) by a.mx.sunsite.dk with SMTP; 10 Apr 2004 17:44:32 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i3AHiUM10892 for zsh-workers@sunsite.dk; Sat, 10 Apr 2004 10:44:30 -0700 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040410174430.ZM10891@candle.brasslantern.com> Date: Sat, 10 Apr 2004 17:44:30 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Compsys and KSH_AUTOLOAD MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: **** X-Spam-Status: No, hits=4.7 required=6.0 tests=RCVD_IN_DYNABLOCK, RCVD_IN_NJABL,RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 4.7 I've been having an off-list discussion with Matthias Kopfermann about trouble he's had using the completion system with KSH_AUTOLOAD set. He tried the "zcompile -z" stuff (actually the zrecompile loop) suggested in the manual, but it didn't work for him (I haven't investigated that yet). In glancing through compinit I noted that NO_kshautoload is conspicuously absent from _comp_options. So I tried this: #--- 8< --- snip --- autoload +X -z compinit _main_complete _complete_help _complete_debug \ _expand_alias _bash_completions _history_complete_word _next_tags compinit # Append your usual options _comp_options+=(NO_kshautoload) # Need 4.2.x for += to work #--- 8< --- snip --- The list of functions after compinit in the autoload line are all those that eval $_comp_setup -- that is, all the "entry points" to compsys, or at least all the correctly-implemented entry points. (_complete_debug doesn't do the eval, but it's just a wrapper around _main_complete.) This seems to work out just fine in my tests (I haven't heard back from Matthias yet). Which brings me to my questions: (1) Does this deserve a FAQ entry, or perhaps even a change to the compsys documentation? I guess ksh_autoload isn't a very "frequently" used option, but even the existing paragraph in the manual about it not working is pretty deeply buried. (2) Should we change _comp_options to always include NO_kshautoload? (3) Should we change compinit to run the autoload +X -z of the entry points iff kshautoload is set? (4) If the answer to (3) is "yes," should we have some sort of flag to identify such entry points so we don't need to maintain an accurate list in compinit? For those like _main_complete that have an #autoload line, we could just append "-z" to that, but e.g. _expand_alias is a widget and has a #compdef line instead.