From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4621 invoked from network); 11 Jan 1997 22:46:20 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 11 Jan 1997 22:46:20 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id RAA05629; Sat, 11 Jan 1997 17:55:06 -0500 (EST) Resent-Date: Sat, 11 Jan 1997 17:55:06 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199701112251.XAA02453@hzoli.ppp.cs.elte.hu> Subject: Re: Breakage with compctl? To: duvall@dhduvall.student.Princeton.EDU (Danek Duvall) Date: Sat, 11 Jan 1997 23:51:49 +0100 (MET) Cc: zsh-workers@math.gatech.edu In-Reply-To: <199701110304.WAA05421@lorien.princeton.edu> from Danek Duvall at "Jan 10, 97 10:04:37 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"vrANG1.0.rN1.9f1so"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2782 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > Run zsh -f and source a file containing the following: > > friends=( duvall ) > > _machines=( lorien.princeton.edu cassius.mts.jhu.edu ) > > function _get_hosts { > typeset -l _user > reply=() > read -l > _user=($=REPLY) > reply=($_machines) > } > > compctl -q -k friends -S @ -x 'n[0,@]' -K _get_hosts -- finger talk ytalk > > Now type: > > % finger duvall@lo > > Which expands to > > % finger duvall@lorien.princeton.edu _ > > Now erase back to the @: > > % finger duvall@_ > > and expand: > > % The fix is below. read -l was buggy. Zoltan *** Src/builtin.c 1997/01/11 00:45:31 3.1.1.14 --- Src/builtin.c 1997/01/11 22:22:50 *************** *** 2785,2791 **** putchar('\n'); } if (!ops['e']) ! setsparam(reply, (char *) line); return 0; } --- 2785,2791 ---- putchar('\n'); } if (!ops['e']) ! setsparam(reply, ztrdup((char *) line)); return 0; }