From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21852 invoked from network); 29 Mar 2006 10:13:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Mar 2006 10:13:46 -0000 Received: (qmail 34926 invoked from network); 29 Mar 2006 10:13:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Mar 2006 10:13:38 -0000 Received: (qmail 12485 invoked by alias); 29 Mar 2006 10:13:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10103 Received: (qmail 12472 invoked from network); 29 Mar 2006 10:13:30 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 Mar 2006 10:13:30 -0000 Received: (qmail 33814 invoked from network); 29 Mar 2006 10:13:30 -0000 Received: from happygiraffe.net (81.6.215.59) by a.mx.sunsite.dk with SMTP; 29 Mar 2006 10:13:30 -0000 Received: from localhost (localhost.happygiraffe.net [127.0.0.1]) by happygiraffe.net (Postfix) with ESMTP id 2FC93B833; Wed, 29 Mar 2006 11:13:24 +0100 (BST) Received: from happygiraffe.net ([127.0.0.1]) by localhost (gimli.happygiraffe.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 94952-07-2; Wed, 29 Mar 2006 11:13:23 +0100 (BST) Received: by happygiraffe.net (Postfix, from userid 1001) id CB6D9B82C; Wed, 29 Mar 2006 11:13:23 +0100 (BST) Date: Wed, 29 Mar 2006 11:13:23 +0100 To: Christopher Browne Cc: zsh-users@sunsite.dk Subject: Re: Using custom completion... Message-ID: <20060329101323.GA94716@gimli.happygiraffe.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11 From: dom@happygiraffe.net (Dominic Mitchell) X-Virus-Scanned: amavisd-new at happygiraffe.net On Tue, Mar 28, 2006 at 11:47:27PM +0000, Christopher Browne wrote: > Dominic Mitchell had set up a sample completion for psql: > http://www.zsh.org/mla/users/2004/msg01006.html > [it's pretty obvious which bits are script, and which aren't] > > I'm not entirely sure what I need to do to get it operating. > > It appears as though an appropriate place to stow it on my system is thus: > /usr/share/zsh/4.3.2/functions/Completion/Unix/_psql I install it on a per-user basis: % ls ~/libexec/zsh/_pgsql_utils /home/dom/libexec/zsh/_pgsql_utils Then I've got this in my ~/.zshrc: fpath=( ~/libexec/zsh $fpath ); Note that it has to come before you call compinit. > I'm not sure if I need to run anything extra to get it to be noticed; > it doesn't seem to be turning quite right, as I'm seeing ill output: > _arguments:comparguments:208: invalid argument: > cbbrowne@dba2:~> > > I'd be more than happy to help contribute whatever assistance to > getting bits of it working that I can; I'm in a pretty "psql-happy" > environment, so improving globbing on this is no bad thing ;-). It does work well for me here, under Debian and FreeBSD. But if it's not working correctly, I'll gladly do what I can to make it work for you. A quick way to check whether or not it's working is to press ^Xh after typing in "psql ". You should get output like this: % psql tags in context :completion::complete:psql:: argument-1 options (_arguments _psql _pgsql_utils) -Dom