From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19219 invoked from network); 31 Aug 1999 09:57:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 31 Aug 1999 09:57:32 -0000 Received: (qmail 1729 invoked by alias); 31 Aug 1999 08:44:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7566 Received: (qmail 1709 invoked from network); 31 Aug 1999 08:44:03 -0000 Date: Tue, 31 Aug 1999 10:37:00 +0200 (MET DST) Message-Id: <199908310837.KAA27373@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Mon, 30 Aug 1999 13:53:07 +0200 Subject: Re: some notes on 3.1.6 Peter Stephenson wrote: > Sven Wischnowsky wrote: > > .. but requiring that all > > widgets they want to bind have to be defined by the user first is a > > bit too much, I think > > But they don't have to be defined first. > > % bindkey '^[OS' foobar > % bindkey '^[OR' whatever > % foobar() { whatever() { LBUFFER="${LBUFFER}x" }; zle -N whatever; } > % zle -N foobar > > works as expected (S-F12 then S-F11 on my keyboard adds an 'x', without > `whatever' being defined when I bound it. Unless I've missed the point. Oh. Stupid me... I thought I had tried this once and it didn't work. Seems like I made some other mistake then. Sorry. > > The > > AUTO_PARAM_SLASH problem was already mentioned (the problem is that we > > made such parameter completions be handled almost completely in shell > > code, so we would have to add the slashes there, too, which is a bit > > slowish). > > I've actually been doing the following and it's not so bad (it doesn't > actually use the option). Maybe it could just blindly use the option, as > long as we mention the fact that it may be slow. Maybe there's a way of > enhancing compadd to get it to work easily: some form of the -f option > which takes an array argument giving to the actual files to test instead > of using the normal arguments? Ah. I hadn't thought of something comparable to `-f'. That just says `this is a filename, do the file-tests if needed (in do_single())'. We could add an option that says `this is a parameter name, do the file-tests for it if AUTO_PARAM_SLASH is set'. We would have to get all the prefix/suffix stuff right then (and define how they work in that case), but it should be possible... I just don't know if this is probably to special a case. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de