zsh-workers
 help / color / mirror / code / Atom feed
* Re: Completion help
       [not found] ` <563731560805120709u10afbeefp2cf666b2d7304889@mail.gmail.com>
@ 2008-05-12 14:12   ` praful mathur
  2008-05-12 14:31     ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: praful mathur @ 2008-05-12 14:12 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

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.
_______
dasickis



-- 
_______
dasickis

[-- Attachment #2: Type: text/html, Size: 267 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Completion help
  2008-05-12 14:12   ` Completion help praful mathur
@ 2008-05-12 14:31     ` Peter Stephenson
  2008-05-12 21:28       ` praful mathur
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2008-05-12 14:31 UTC (permalink / raw)
  To: praful mathur; +Cc: zsh-workers

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Completion help
  2008-05-12 14:31     ` Peter Stephenson
@ 2008-05-12 21:28       ` praful mathur
  0 siblings, 0 replies; 3+ messages in thread
From: praful mathur @ 2008-05-12 21:28 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

Thank you. Yeah, my original question wasn't very clear I looked through the
man pages and the online guide, but I'll just buy the book and read through
it. I've also gone through the completion scripts provided by zsh developers
(but they're not very well commented so it's hard to figure out). Also, the
man page is really comprehensive and I've just skimmed through it looking
for key concepts. But I'm sure the book has a much better explanation and
I'll go out and buy it ASAP.

Thank you once again.

_______
dasickis

[-- Attachment #2: Type: text/html, Size: 577 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-12 21:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <563731560805071045v2d4be6c6yc8c323db2d0b3a12@mail.gmail.com>
     [not found] ` <563731560805120709u10afbeefp2cf666b2d7304889@mail.gmail.com>
2008-05-12 14:12   ` Completion help praful mathur
2008-05-12 14:31     ` Peter Stephenson
2008-05-12 21:28       ` praful mathur

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).