From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29978 invoked from network); 11 Aug 2001 21:34:38 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Aug 2001 21:34:38 -0000 Received: (qmail 8425 invoked by alias); 11 Aug 2001 21:34:24 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4113 Received: (qmail 8414 invoked from network); 11 Aug 2001 21:34:22 -0000 From: Bart Schaefer Message-Id: <1010811212358.ZM1092@candle.brasslantern.com> Date: Sat, 11 Aug 2001 21:23:58 +0000 In-Reply-To: <3B7512B9.8010104@mow.siemens.ru> Comments: In reply to Borsenkow Andrej "Re: globbing" (Aug 11, 3:10pm) References: <20010810002007.A4701@hq.newdream.net> <000401c1217c$38454690$21c9ca95@mow.siemens.ru> <20010810123418.H4701@hq.newdream.net> <3B7512B9.8010104@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: Borsenkow Andrej , Will Yardley Subject: Re: globbing Cc: zsh-users@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 11, 3:10pm, Borsenkow Andrej wrote: } } > in zsh i can only expand it if i put a space, and then the result looks } > like: } > aura% cd /usr/local/ bin/ } > } > complete_in_word doesn't do this (as was mentioned the last time someone } > brought this up on the list). i find the bash way much more intuitive even } > if the zsh way is more 'correct'. } } You have to use expand-or-complete-prefix instead of expand-or-complete } (or complete-word), like } } bindkey '^I' expand-or-complete-prefix } setopt completeinword } } But then your first problem is back - there is no complete-prefix widget. You can, however, roll your own (but not in 3.0.x): bash-complete () { emulate -L zsh if [[ $RBUFFER = (|[[:space:]\;\&\|\>]*) ]] then zle complete-word # Completing at end of word is not special else setopt noautomenu # Cannot menu-complete the prefix, sorry RBUFFER[1]=" $RBUFFER[1]" zle complete-word RBUFFER[1,2]=$RBUFFER[2] if [[ $LBUFFER[-1] = $RBUFFER[1] ]] then LBUFFER[-1]='' # Suppress doubled slashes, for example fi fi } zle -N bash-complete bindkey '\t' bash-complete This could, I suppose, get added to the collection of bash-alike functions that PWS has created. It does appear to work with `setopt bashautolist'. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net