From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Date: Mon, 1 Feb 1999 09:15:58 +0100 (MET) Message-Id: <199902010815.JAA02863@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Fri, 29 Jan 1999 09:04:12 -0800 Subject: Re: PATCH: zle parameters in completion widgets X-Mailing-List: 5138 Bart Schaefer wrote: > On Jan 29, 11:08am, Sven Wischnowsky wrote: > } Subject: PATCH: zle parameters in completion widgets > } > } Now, to get completion only on the second tab, just add > } > } [[ "$WIDGET" != "$LASTWIDGET" ]] && return > > Actually, the request as for completion on the first tab, but autolist > only on the second tab. [That would be only `setopt LIST_AMBIGUOUS'.] After playing with bash a bit, it seems that to fully copy the behaviour one would have to setopt LIST_AMBIGUOUS and use something like: lastbuffer='' # non-local variable definition ... completion-widget() { ... [[ "$BUFFER" = "$lastbuffer" && "$WIDGET" != "$LASTWIDGET" ]] && return ... } At least I get completion of the unambiguous stuff on the first tab, nothing on the second and the list on the third. > So it'd have to be something like > > [[ "$WIDGET" != "$LASTWIDGET" ]] && complist ... > > where "..." gets filled in appropriately for whatever other completion > is in progress. Right? See above. Also: to allow the completion widget to say if only something should be inserted or if also the list should be shown, we would need a way to control this kind of stuff from the widget. This is on my wish list (it also appears somewhere in my longish description mail), but not yet implemented. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de