From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17833 invoked from network); 28 Feb 2003 11:06:25 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Feb 2003 11:06:25 -0000 Received: (qmail 6755 invoked by alias); 28 Feb 2003 11:06:00 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5949 Received: (qmail 6748 invoked from network); 28 Feb 2003 11:06:00 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Feb 2003 11:06:00 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [193.109.254.147] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Feb 2003 11:5:59 -0000 X-VirusChecked: Checked X-Env-Sender: kiddleo@logica.com X-Msg-Ref: server-3.tower-27.messagelabs.com!1046430358!1694 Received: (qmail 7212 invoked from network); 28 Feb 2003 11:05:58 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-3.tower-27.messagelabs.com with SMTP; 28 Feb 2003 11:05:58 -0000 Received: from finches.logica.co.uk ([158.234.142.11]) by iris.logica.co.uk (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id LAA18348; Fri, 28 Feb 2003 11:05:58 GMT X-Authentication-Warning: iris.logica.co.uk: Host [158.234.142.11] claimed to be finches.logica.co.uk Received: from finches.logica.co.uk (localhost [127.0.0.1]) by finches.logica.co.uk (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h1SB9ZD25501; Fri, 28 Feb 2003 12:09:35 +0100 In-reply-to: <20030228095300.GA19785@io.com> From: Oliver Kiddle References: <20030228095300.GA19785@io.com> To: John Buttery cc: zsh-users@sunsite.dk Subject: Re: Interesting tidbit about bash completion Date: Fri, 28 Feb 2003 12:09:35 +0100 Message-ID: <25499.1046430575@finches.logica.co.uk> Sender: kiddleo@logica.com On 28 Feb, you wrote: > > > Just saw this in the "bash programmable completion" freshmeat projects > update: > > # bash completion is now compatible with the new bash completion > # emulation feature of zsh. > > What does this mean (if anything) to us? The change is little more than changing a few ugly bashisms like: if [ ${BASH_VERSINFO[1]} '>' 04 ]; then to: if [[ ${BASH_VERSINFO[1]} > 04 ]]; then I sent them a patch to do that to save me the hassle of having to modify /etc/bash_completion before sourcing it from zsh. If anyone is interested, I use this function to source it: bash_source() { alias shopt=':' alias _expand=_bash_expand alias _complete=_bash_comp emulate -L sh setopt kshglob noshglob braceexpand source "$@" } This is only useful for testing bashcompinit because it will override lots of zsh completions. You could alias around all zsh functions with: for f in ${(kM)functions:#_*}; alias $f=_bash_$f and then use: alias compdef='compdef -n' when running bashcompinit (so don't use the -U option to autoload) I could perhaps put _bash_source in bashcompinit and add a -n option so that it uses compdef -n. Oliver This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.