From: dom@happygiraffe.net (Dominic Mitchell)
To: Christopher Browne <cbbrowne@gmail.com>
Cc: zsh-users@sunsite.dk
Subject: Re: Using custom completion...
Date: Wed, 29 Mar 2006 11:13:23 +0100 [thread overview]
Message-ID: <20060329101323.GA94716@gimli.happygiraffe.net> (raw)
In-Reply-To: <d6d6637f0603281547i6893823eld781c9edec70eeb0@mail.gmail.com>
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
prev parent reply other threads:[~2006-03-29 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-28 23:47 Christopher Browne
2006-03-29 10:13 ` Dominic Mitchell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060329101323.GA94716@gimli.happygiraffe.net \
--to=dom@happygiraffe.net \
--cc=cbbrowne@gmail.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).