From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1064 invoked from network); 18 Jan 2000 10:38:14 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jan 2000 10:38:14 -0000 Received: (qmail 28698 invoked by alias); 18 Jan 2000 10:38:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9340 Received: (qmail 28641 invoked from network); 18 Jan 2000 10:38:07 -0000 To: zsh-workers@math.gatech.edu Subject: PATH: EQUAL completion fixe X-Attribution: adl From: Alexandre Duret-Lutz Date: 18 Jan 2000 11:37:57 +0100 Message-ID: User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii There was a bug in _arguments completion for `=' options : % a2ps --prologue prologue bold bw color diff gray gray2 matrix % a2ps --prologue % a2ps --prologuebold Since `--prologue' is recognized as an option name by ca_get_opt(), no `=' is added, and match are appended right after the option. The patch below prevent EQUAL options from beeing recognized unless there is the `=' or a space before the next word. % a2ps --prologue should complete to % a2ps --prologue= Index: Src/Zle/computil.c --- Src/Zle/computil.c Wed, 05 Jan 2000 14:51:45 +0100 Alexandre +++ Src/Zle/computil.c Tue, 18 Jan 2000 11:29:23 +0100 Alexandre @@ -1109,7 +1109,10 @@ /* See if it's an option. */ - if (state.opt == 2 && (state.curopt = ca_get_opt(d, line, 0, &pe))) { + if (state.opt == 2 && (state.curopt = ca_get_opt(d, line, 0, &pe)) && + (state.curopt->type != CAO_EQUAL || + compwords[cur] || pe[-1] == '=')) { + ddef = state.def = state.curopt->args; doff = pe - line; state.optbeg = state.argbeg = state.inopt = cur; -- Alexandre Duret-Lutz