From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6203 invoked from network); 5 Jul 2000 14:38:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Jul 2000 14:38:15 -0000 Received: (qmail 20859 invoked by alias); 5 Jul 2000 14:36:51 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12176 Received: (qmail 20791 invoked from network); 5 Jul 2000 14:36:50 -0000 Date: Wed, 5 Jul 2000 16:36:44 +0200 (MET DST) Message-Id: <200007051436.QAA11795@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Oliver Kiddle's message of Wed, 05 Jul 2000 15:10:10 +0100 Subject: Re: completing history words Oliver Kiddle wrote: > I'm a little bit mystified by the way _history_complete_word is > implemented as it seems to re-implement menu-completion while not > offering non-menu completion. Why does it not just complete history > words and rely on separate completers based on different builtin > widgets (menu-complete, complete-word etc)? I wanted to be able to > complete history in a fairly normal way but it behaves in a slightly > strange way, doing things like inserting a match for ambiguous > completions. It's rather old... > I created a small function (_complete_history) containing just the > line: > compadd -Q -a 'historywords[2,-1]' Have you seen the _history completer? > ... > > > It actually seems to have a problem with strange characters (e.g. > '$') not being considered part of the word being completed but other > than that, it is fine. See some recent mails, _history and _h_c_w put $IPREFIX into $PREFIX for that. > Obviously, my _complete_history function could be much improved with > styles for sorting and to manipulate compstate so listing etc can be > turned off but this way of doing it seems better to me. It is much > simpler and configuration of it will be more similar to configuring for > other completion widgets. Can anyone please explain why it is currently > done differently? Well, Adam will have to have the final word about this... Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de