zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: "praful mathur" <dasickis@gmail.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: Completion help
Date: Mon, 12 May 2008 15:31:36 +0100	[thread overview]
Message-ID: <20080512153136.38d17b6b@news01> (raw)
In-Reply-To: <563731560805120712r53a42ed0gda7b2260276faa0f@mail.gmail.com>

On Mon, 12 May 2008 10:12:33 -0400
"praful mathur" <dasickis@gmail.com> wrote:
> Can someone please direct me where this question has already been answered?
> I've tried looking in zshall but I can't quite find an answer to my
> question.

I didn't really follow your original question since you're code doesn't
seem to correspond to how the completion system actually works.

If you want to know how to use _arguments, start by looking at the many
existing completion functions that call _arguments and compare with what's
in the description for _arguments in the zshcompsys manual page.

For example, _hash (in Completion/Zsh/Command in the source) has the same
problem of dealing with an option -d that gets followed by a directory and
isn't as hairy of some of the files.  You will have to look around and if
you get stuck ask *specific* questions with which people will have more
time to help.

If you want a step-by-step guide, try the online guide at
http://zsh.sunsite.dk/Guide/zshguide06.html#l177
(that's the tutorial section for completion: you might want to start
earlier).

For more detailed guidance, our book

From Bash to Z Shell: Conquering the Command Line (Paperback) 
 by Oliver Kiddle (Author), Jerry Peek (Author), Peter Stephenson (Author) 
Paperback: 472 pages
Publisher: APRESS (1 Dec 2004)
Language English
ISBN-10: 1590593766
ISBN-13: 978-1590593769

has a lot on completion.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


  reply	other threads:[~2008-05-12 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <563731560805071045v2d4be6c6yc8c323db2d0b3a12@mail.gmail.com>
     [not found] ` <563731560805120709u10afbeefp2cf666b2d7304889@mail.gmail.com>
2008-05-12 14:12   ` praful mathur
2008-05-12 14:31     ` Peter Stephenson [this message]
2008-05-12 21:28       ` praful mathur

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=20080512153136.38d17b6b@news01 \
    --to=pws@csr.com \
    --cc=dasickis@gmail.com \
    --cc=zsh-workers@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).